7 int Uncompress(
void *dest,
unsigned int *destLen,
const void *
source,
unsigned int sourceLen) {
11 int Compress(
void *dest,
unsigned int *destLen,
void *
source,
unsigned int sourceLen) {
17 Bytef *dest =
nullptr;
18 int res = Z_BUF_ERROR;
19 while (
res == Z_BUF_ERROR) {
20 if (dest !=
nullptr) {
25 dest = (
Bytef*)malloc(destLen);
32 memcpy((
void*)
result->GetData(), dest, destLen);
40 Bytef *dest =
nullptr;
41 int res = Z_BUF_ERROR;
42 while (
res == Z_BUF_ERROR) {
43 if (dest !=
nullptr) {
48 dest = (
Bytef*)malloc(destLen);
55 memcpy((
void*)
result->GetData(), dest, destLen);