Functions | |
int | stuff_data (unsigned char *input_data, unsigned char *output_data, int input_length, int output_length) |
int | unstuff_data (unsigned char *input_data, unsigned char *output_data, int input_length, int output_length) |
int stuff_data | ( | unsigned char * | input_data, | |
unsigned char * | output_data, | |||
int | input_length, | |||
int | output_length | |||
) |
Byte stuffing
This function performes byte stuffing. All zero-valued bytes in the input_data will be eliminated. The result will be stored in the output_data. This operation involves some marginal data expansion, no more than 0.4% at worst case.
input_data | Input data | |
output_data | Output data | |
input_length | Input data length | |
output_length | Output data length |
Referenced by eps_encode_grayscale_block(), and eps_encode_truecolor_block().
int unstuff_data | ( | unsigned char * | input_data, | |
unsigned char * | output_data, | |||
int | input_length, | |||
int | output_length | |||
) |
Byte unstuffing
This function is inverse to the previous one. It recovers original data. The result will be stored in the output_data.
input_data | Input data | |
output_data | Output data | |
input_length | Input data length | |
output_length | Output data length |
Referenced by eps_decode_grayscale_block(), and eps_decode_truecolor_block().