Guy
Guy

Reputation: 501

How do I "unzip" a gzipped stream while reading it

My program is using HTTP to read gzipped files over the network.
I need my program to be able to unzip the content and parse it even when not all the gzipped file arrived yet.
Can it be done ?
If so, can it be done in C++ ? If so, how ?

Upvotes: 4

Views: 4465

Answers (2)

hlovdal
hlovdal

Reputation: 28190

You could probably try out the gzstream library:

Gzstream is a small C++ library, basically just a wrapper, that provides the functionality of the zlib C-library in a C++ iostream. It is freely available under the LGPL license.

Upvotes: 7

Ronny Brendel
Ronny Brendel

Reputation: 4845

http://www.zlib.net/

Zlib is able to read gzip. Have a look at the manual. http://www.zlib.net/manual.html#Gzip

Upvotes: 4

Related Questions