This module contains a routine which transcodes the 24-bit modulo compression scheme used by a DM24mk3 over BRP into 32-bit differences used elsewhere. The 24-bit scheme cannot be a primary encoding because it relies on the block length being available. BRP will preserve the block length but disk files and Scream! will not.
◆ gcf_transcode_24_to_32()
int gcf_transcode_24_to_32 |
( |
struct gcf_data_hdr * |
hdr, |
|
|
char * |
block |
|
) |
| |
Transcode 24-bit differences to 32-bit differences.
- Parameters
-
[in,out] | hdr | The header of the data block. |
[in,out] | block | The raw block data. |
- Return values
-
This function will transcode the 24-bit modulo difference compression scheme used by a DM24mk3 over BRP into standard 32-bit differences. It must be passed a valid 24-bit block. It may fail if there is a checksum error, in which case it will return -1. Otherwise, the data pointed to by block and hdr is modified and 0 is returned.