4
votes

Crypto++ includes

DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and zlib (RFC 1950) format support

, but I'm not sure how I could translate that into reading a ZIP file. (I'm not averse to implementing my own ZIP traversing logic; but of course if the library already has that built in I don't want to duplicate things).

If the library doesn't provide this functionality out of the box, how does one access the zlib and gzip bits (in order to implement the compression/decompression steps)?

1

1 Answers

3
votes

I am not sure about the latest versions of Crypto++ but it was something like this before

// write to file
Gzip zip(new FileSink (output_filename, true ), Gzip::DEFAULT_DEFLATE_LEVEL);
zip.Put(buf, dwBufSize);
zip.MessageEnd();