8 #define MINIZ_NO_ARCHIVE_APIS
10 #define MINIZ_NO_ZLIB_APIS
11 #define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
12 #define MINIZ_NO_MALLOC
37 MinizCompressor::MinizCompressor(
int iCompressionLevel)
42 m_pDeflator =
reinterpret_cast<void*
>(pDeflator);
46 static const mz_uint s_tdefl_num_probes[11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500 };
50 if (!iCompressionLevel)
67 unsigned long source_len = uUncompressedInputSize;
70 return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5);
83 ss <<
"tdefl_init() failed with return code '" << status <<
"'";
88 size_t ulSrcLength = uSrcLength;
89 size_t ulDstLength = uDstLength;
98 ss <<
"tdefl_compress() failed with return code '" << status <<
"'";
112 POLYVOX_ASSERT(
isPowerOf2(uDstLength),
"Miniz decompressor requires the destination buffer to have a size which is a power of two.");
115 POLYVOX_THROW(std::invalid_argument,
"Miniz decompressor requires the destination buffer to have a size which is a power of two.");
119 size_t ulSrcLength = uSrcLength;
120 size_t ulDstLength = uDstLength;
134 ss <<
"tinfl_decompress() failed with return code '" << status <<
"'";