Extracting gzip via passive library

I need to extract a large gzip data stream in C ++ (on Linux) into memory. I intended to use libarchive

, but I have a limitation that I cannot block or use any sync.

AFAIR, to use a custom reader libarchive

, it must block until data is available.

So I would like it to be the other way around. A library that has write / execute callbacks and the ability to manually enter data.

Is there any library that does this, or is it quicker to modify libarchive

to work differently?

+3


source to share


1 answer


If you only want gzip unpacking and not tar extraction, you can use zlib . Probably already on your system zlib.h (also has documentation ) and libz.so.



If you also require tar extraction, you can try libtar .

+1


source







All Articles