Reputation: 161
I try to compress memory data by using libbz2 library in C program.
Should I use this function of libbz2?:
int BZ2_bzCompress ( bz_stream *strm, int action );
Can anyone show me an example?
Thank you.
Upvotes: 1
Views: 4265
Reputation: 2976
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
Upvotes: 2