Is there any cross-platform gzip processor library

2019-02-09 05:39发布

I want some library (API) to open, seek, read, write ... (in one word to process) gzip files. Is there any open-source cross-platform ones for C or C++?

3条回答
Juvenile、少年°
2楼-- · 2019-02-09 05:53

If you're interested in the magic of Boost, check out Boost's stream filters which can be arbitrarily combined and cascaded; there's built-in support for gzip, DEFLATE (that's GZip minus the header) and bzip2. Very handy.

查看更多
放荡不羁爱自由
3楼-- · 2019-02-09 05:57

Yes. Zlib is the one.

There is also this related question on how to process gzip files more easily and conveniently in C++. The most notable and up to date suggestion seems to be the GZip filters in Boost.IOStreams, which I have good experience with myself.

查看更多
我只想做你的唯一
4楼-- · 2019-02-09 06:17

Yes, sure, zlib is the basic library and it has additional bindings other languages as listed on the webpage as eg gzstream providing a C++ wrapper to the gz* functions.

zlib, being a C-language library, is also extremely portable and cross-platform. See the webpage for links to Solaris, SCO, BeOS, MaxOS, OS/2 (!!), Palm Pilot, Newton (!!), Windows CE (!!), Blackberry, Windows, .Net, ... versions.

查看更多
登录 后发表回答