OpenMoHAA 0.82.1
Loading...
Searching...
No Matches
cLZ77 Class Reference

Public Member Functions

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.
 

Member Function Documentation

◆ 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
inInput (uncompressed) buffer.
in_lenNumber of input bytes.
outOutput (compressed) buffer. This buffer must be 0.4% larger than the input buffer, plus one byte.
out_lenOutput 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
inInput (compressed) buffer.
in_lenNumber of input bytes.
outOutput (uncompressed) buffer. This buffer must be large enough to hold the uncompressed data.
out_lenOutput 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: