|
int | Compress (unsigned char *in, size_t in_len, unsigned char *out, size_t *out_len) |
| Compress a block of data using an LZ77 coder.
|
|
int | Decompress (unsigned char *in, size_t in_len, unsigned char *out, size_t *out_len) |
| Uncompress a block of data using an LZ77 decoder.
|
|
◆ Compress()
int cLZ77::Compress |
( |
unsigned char * | in, |
|
|
size_t | in_len, |
|
|
unsigned char * | out, |
|
|
size_t * | out_len ) |
Compress a block of data using an LZ77 coder.
- Parameters
-
in | Input (uncompressed) buffer. |
in_len | Number of input bytes. |
out | Output (compressed) buffer. This buffer must be 0.4% larger than the input buffer, plus one byte. |
out_len | Output length. |
- Returns
- Always return 0.
◆ Decompress()
int cLZ77::Decompress |
( |
unsigned char * | in, |
|
|
size_t | in_len, |
|
|
unsigned char * | out, |
|
|
size_t * | out_len ) |
Uncompress a block of data using an LZ77 decoder.
- Parameters
-
in | Input (compressed) buffer. |
in_len | Number of input bytes. |
out | Output (uncompressed) buffer. This buffer must be large enough to hold the uncompressed data. |
out_len | Output length. |
- Returns
- 0 on success. -1 if not enough data was read, -2 if too much data was read.
The documentation for this class was generated from the following files:
- code/qcommon/lz77.h
- code/qcommon/lz77.cpp