DarkflameServer/dCommon/ZCompression.h

19 lines
431 B
C
Raw Normal View History

2022-08-06 03:01:59 +00:00
#pragma once
#include <cstdint>
2022-07-28 13:39:57 +00:00
namespace ZCompression {
int32_t GetMaxCompressedLength(int32_t nLenSrc);
int32_t Compress(const uint8_t* abSrc, int32_t nLenSrc, uint8_t* abDst, int32_t nLenDst);
int32_t Decompress(const uint8_t* abSrc, int32_t nLenSrc, uint8_t* abDst, int32_t nLenDst, int32_t& nErr);
/**
* @brief Max size of an inflated sd0 zlib chunk
*
*/
constexpr uint32_t MAX_SD0_CHUNK_SIZE = 1024 * 256;
}