# Zstr

Note

A C++ ZLib wrapper by Matei David, published on GITHUB here.

STL iostream implementation using the library zlib. This means that you can easily manipulate zipped streams like any other STL ostream/istream.

To give you an idea, consider following snippet that create a gzipped files:

    std::ofstream file("hello_world.txt.gz");
    zstr::ostream gzfile(file);
    gzfile << "Hello world\n";
    gzfile.flush(); // must be flushed before close stream
    file.close();

Note

From original documentation:

As you can see adding zipped buffers into your existing applications is quite straightforward.