Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.21 KB

README.md

File metadata and controls

30 lines (20 loc) · 1.21 KB

protobuf-zerocopy-compression

This C++ library implements some basic compressed input/output streams implementing the ZeroCopy Interface from Google(TM) protobuf 2.4.1. Currently, gzip, zlib, snappy and lz4 (included) are supported, but any blockwise compression algorithm could be plugged in with little effort.

Quickstart

The main interface is defined and documented in compressed_stream.h.

An example program is test.cc

A quick look:

#include <compressed_stream.h>
...
zerocc::AbstractCompressedInputStream * in = get_compressed_input_stream(&my_infile_stream);
...
zerocc::AbstractCompressedOutputStream * out = get_compressed_output_stream(&my_outfile_stream, zerocc::ZLIB, 4);

To compile the static library and the test program, just run

./waf go

Have fun!