This section explains how to use compression engines with WiredTiger, including the builtin support for bzip2 and snappy.
To use the builtin bzip2 compression, first verify that bzip2 is installed on your system. On most UNIX and Linux variants, there will be a bzlib.h
header file in the include directory for the compiler, as well as a library file available, often named libbz2.so
, in /usr/lib
. If these are available, you can simply enable bzip2 by using the –enable-bzip2
option when running configure.
If you have installed your own version of bzip2 in a non-standard location, you'll need to modify the CPPFLAGS
and LDFLAGS
to indicate these locations. For example, with bzip2 includes and libraries installed in /usr/local/include
and /usr/local/lib
, run configure as:
After building, check that this compressor is built and working by running the compression part of the test suite:
Verify that the bzip2 part of the test passes and was not skipped.
Google's snappy compressor is generally not installed by default on UNIX and Linux distributions, so you will need to download, build and install it first. To configure WiredTiger to include snappy, use the –enable-snappy
option along with CPPFLAGS
and LDFLAGS
. For example, with snappy includes and libraries installed in /usr/local/include
and /usr/local/lib
, run configure as:
After building, check that this compressor is built and working by running the compression part of the test suite:
Verify that the snappy part of the test passes and was not skipped.
WiredTiger may be extended by adding custom compression engines; see WT_COMPRESSOR for more information.