Reputation: 947
Quick and simple question.
There are examples online about achieving in-memory gzip compression with zlib (C++) WITHOUT external libraries (like boost or such)?
I just need to compress and decompress a block of data without much options. (it must be gzip as its the same format used by another mine C# program (the data is to be shared))
Tried to search to no avail... Thanks!
Upvotes: 3
Views: 6551
Reputation: 994947
This isn't a complete answer to your question, but you will probably be interested in How can I decompress a gzip stream with zlib?. There is a little bit of poorly documented magic that you need to supply in order for zlib to work with gzip streams.
The zlib API has many functions for doing in-memory compression that don't depend on actual files on disk.
Upvotes: 2