25 lines
897 B
C++
25 lines
897 B
C++
#ifndef WC3RE_DECOMPRESS_HH__
|
|
#define WC3RE_DECOMPRESS_HH__
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
/* Decompression routines for various proprietary compression formats found in
|
|
WC3 */
|
|
|
|
/* LZ77-like format consisting of codes specifing copies from the input stream
|
|
and/or replication of previously output data */
|
|
|
|
/* Decompress compressed data in 'data', return decompressed data */
|
|
std::vector<uint8_t> decompressLZ(uint8_t const* data, size_t len, size_t retlen_hint = 0);
|
|
/* Decompress compressed data in 'data' into pre-allocated buffer 'out' of size 'maxOut',
|
|
return size of decompressed data */
|
|
size_t decompressLZInto(uint8_t const* data, size_t len, uint8_t * out, size_t maxOut);
|
|
|
|
|
|
/* LZW-type compression */
|
|
|
|
/* Decompress compressed data in 'data', return decompressed data */
|
|
std::vector<uint8_t> decompressLZW(uint8_t const* data, size_t len, size_t retlen_hint = 0);
|
|
#endif
|