Boost logo

Boost :

From: Jonathan de Halleux (dehalleux_at_[hidden])
Date: 2003-10-03 10:53:28

I have implement iostream wrappers around the zlib and bzip2 compression
library. I emphasize that the zlib wrapper does not rely on gz methods and
therefore it is not limited to file->buffer or buffer->file operation.

A simple example of the stream is as follows:

ostream& output; // suppose this reference is initialized

     zip_ostream zipper( output ); // creating a zipper on top of output
     // zipper behaves as any ostream
} // when closed, the zipper is flushed.

That's it. Basically, these wrapper makes it very easy to add compression
to existing applications. Any suggestions welcome :)

The demo application is in the yahoo files section, at
You can also have a look at an article that explains deeper zipstreams at

Jonathan de Halleux, Research Assistant
Center for Systems Engineering and Applied Mechanics (CESAME)
Universite catholique de Louvain
Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595
B-1348 Louvain-la-Neuve Belgium
E-mail : dehalleux_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at