I am trying to implement the zlib.h deflate and inflate functions to compress and decompress a char array (not a file).
I would like to know if the following syntax
The zpipe example (http://zlib.net/zpipe.c) pretty much covers it, just remove the file ops(the f prefixed function), and you replace in
and out
with your in-memory buffers, though it may be enough to only replace in
or keep the buffers as-is depending on you usage. Just note that you will need to make your out buffer resizeable to account for decompression of arbitrarily sized data, if you are planning on having unknown sized chunks