Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/132.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 增压-放气和无符号字符ptr_C++_Boost_Zlib_Deflate - Fatal编程技术网

C++ 增压-放气和无符号字符ptr

C++ 增压-放气和无符号字符ptr,c++,boost,zlib,deflate,C++,Boost,Zlib,Deflate,我有指向无符号字符数组的指针和数据长度 例如: int length = 10; unsigned char *data = new unsigned char[length]; std::fill(data, data + length - 1, 0x03); 我需要压缩数据,并在无符号字符数组中得到结果 我发现了许多使用boost zlib(例如)的示例,但它们都使用字符串和许多数据复制。 如何在尽可能少的数据复制的情况下,对无符号字符数组进行放气并在其他无符号字符数组中得到结

我有指向无符号字符数组的指针和数据长度
例如:

int length = 10;  
unsigned char *data = new unsigned char[length];  
std::fill(data, data + length - 1, 0x03);  
我需要压缩数据,并在无符号字符数组中得到结果
我发现了许多使用boost zlib(例如)的示例,但它们都使用字符串和许多数据复制。
如何在尽可能少的数据复制的情况下,对无符号字符数组进行放气并在其他无符号字符数组中得到结果