My Project
|
Functions | |
int | wc_Compress (byte *out, word32 outSz, const byte *in, word32 inSz, word32 flags) |
This function compresses the given input data using Huffman coding and stores the output in out. Note that the output buffer should still be larger than the input buffer because there exists a certain input for which there will be no compression possible, which will still require a lookup table. It is recommended that one allocate srcSz + 0.1% + 12 for the output buffer. More... | |
int | wc_DeCompress (byte *out, word32 outSz, const byte *in, word32 inSz) |
This function decompresses the given compressed data using Huffman coding and stores the output in out. More... | |
int wc_Compress | ( | byte * | out, |
word32 | outSz, | ||
const byte * | in, | ||
word32 | inSz, | ||
word32 | flags | ||
) |
This function compresses the given input data using Huffman coding and stores the output in out. Note that the output buffer should still be larger than the input buffer because there exists a certain input for which there will be no compression possible, which will still require a lookup table. It is recommended that one allocate srcSz + 0.1% + 12 for the output buffer.
out | pointer to the output buffer in which to store the compressed data |
outSz | size available in the output buffer for storage |
in | pointer to the buffer containing the message to compress |
inSz | size of the input message to compress |
flags | flags to control how compression operates. Use 0 for normal decompression |
Example
int wc_DeCompress | ( | byte * | out, |
word32 | outSz, | ||
const byte * | in, | ||
word32 | inSz | ||
) |
This function decompresses the given compressed data using Huffman coding and stores the output in out.
out | pointer to the output buffer in which to store the decompressed data |
outSz | size available in the output buffer for storage |
in | pointer to the buffer containing the message to decompress |
inSz | size of the input message to decompress |
Example