How do I read / write gzipped files in C++?

后端 未结 5 893
渐次进展
渐次进展 2020-12-14 03:51

How do I read / write gzipped files in C++?

The iostream wrapper classes here look good, and here is a simple usage example:

gz::igzstre         


        
5条回答
  •  温柔的废话
    2020-12-14 04:39

    Obviously you need the cpp-file where the gzstreambase destructor is defined as well, i.e. gzstream.cpp (that's the link fault). libz is just a c-api for gzip, it knows nothing of c++ stdlib streams.

    Boost's iostream lib has gzip and bzip2 streams too.

    EDIT: Updated the link to point to the latest version of the code that includes a major bug fix.

提交回复
热议问题