1

我尝试在 C 程序中使用 libbz2 库来压缩内存数据。

我应该使用libbz2的这个功能吗?:

int BZ2_bzCompress ( bz_stream *strm, int action );

谁能给我一个例子?

谢谢你。

4

1 回答 1

2

http://www.bzip.org/1.0.3/html/util-fns.html

Use BZ2_bzBuffToBuffCompress() and BZ2_bzBuffToBuffDecompress() for simple paired compress/decompress.

This page describes the meaning of the last 3 parms: http://www.bzip.org/1.0.3/html/low-level.html

于 2012-03-06T04:23:07.400 回答