I have a problem with decompressing some gzip data. I have an array with pointers to dynamically allocated char strings. Each element of this array is one part of the gzip file that I want to uncompress. The first thing which comes to my mind is to concatenate those strings to one, and then decompress data, but I want to avoid this method because of a lot of copying.
So the question is: Is there any way to decompress data divided into few parts, using zlib library ? I was trying to do it, but when I decompress the first part I get Z_DATA_ERROR - and it's normal, because the data is not complete. Is there any way to "wait" for the rest of data to decompress?
inflate()
multiple times with the chunks to decompress one by one.... – John ZwinckinflateBack
function which uses callbacks to read and write data. – Some programmer dude