summaryrefslogtreecommitdiff
path: root/src/docs/compression.dox
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-10-26 11:23:29 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-10-26 11:23:29 +0000
commit38591db0fde6c9ad95abd65f10d82b8f62d39740 (patch)
tree9034a46b0945ec6819f240280d772c65317ff677 /src/docs/compression.dox
parent466e7ade5c5c996802b5eb5d1624d9357afbcb5c (diff)
downloadmongo-38591db0fde6c9ad95abd65f10d82b8f62d39740.tar.gz
Rename the WiredTiger installed libraries to libwiredtiger_XXX.
Quit installing the nop and reverse_collator libraries. Rename the session.create block_compressor configuration strings "bzip2_compress" to "bzip2", and "snappy_compress" to "snappy". Add documentation for configuring the built-in bzip2 and snappy configuration in applications.
Diffstat (limited to 'src/docs/compression.dox')
-rw-r--r--src/docs/compression.dox53
1 files changed, 39 insertions, 14 deletions
diff --git a/src/docs/compression.dox b/src/docs/compression.dox
index a9f19b20700..59f03f4e8ef 100644
--- a/src/docs/compression.dox
+++ b/src/docs/compression.dox
@@ -5,21 +5,34 @@ the bzip2 and snappy compression engines.
@section compression_bzip2 Using bzip2 compression
-To use the builtin support for <a href="http://www.bzip.org/">bzip2</a>
+To use the builtin support for
+<a href="http://www.bzip.org/">Julian Seward's bzip2</a>
compression, first check that bzip2 is installed in include and library
directories searched by the compiler. Once bzip2 is installed, you can
enable bzip2 using the \c --enable-bzip2 option to configure.
-If bzip2 is installed in a non-standard location, you'll need to modify
-the \c CPPFLAGS and \c LDFLAGS to indicate these locations. For example,
-with the bzip2 includes and libraries installed in \c /usr/local/include
-and \c /usr/local/lib, you should run configure as follows:
+If bzip2 is installed in a location not normally searched by the
+compiler toolchain, you'll need to modify the \c CPPFLAGS and \c LDFLAGS
+to indicate these locations. For example, with the bzip2 includes and
+libraries installed in \c /usr/local/include and \c /usr/local/lib, you
+should run configure as follows:
@code
cd build_posix
../configure --enable-bzip2 CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/include"
@endcode
+When opening the WiredTiger database, load the bzip2 shared library as
+an extension. For example, with the bzip2 library installed in
+\c /usr/local/lib, you would use the following extension:
+
+@snippet ex_all.c Configure bzip2 extension
+
+Finally, when creating the WiredTiger object, set \c block_compressor
+to \c bzip2:
+
+@snippet ex_all.c Create a bzip2 compressed table
+
If necessary, you can confirm the compressor is working by running the
compression part of the test suite:
@@ -33,22 +46,34 @@ was not skipped.
@section compression_snappy Using snappy compression
-To use the builtin support for Google's
-<a href="http://code.google.com/p/snappy/">snappy</a> compression, first
-check that snappy is installed in include and library directories
-searched by the compiler. Once snappy is installed, you can enable
-snappy using the \c --enable-snappy option to configure.
+To use the builtin support for
+<a href="http://code.google.com/p/snappy/">Google's snappy</a>
+compression, first check that snappy is installed in include and library
+directories searched by the compiler. Once snappy is installed, you can
+enable snappy using the \c --enable-snappy option to configure.
-If snappy is installed in a non-standard location, you'll need to modify
-the \c CPPFLAGS and \c LDFLAGS to indicate these locations. For example,
-with the snappy includes and libraries installed in \c /usr/local/include
-and \c /usr/local/lib, you should run configure as follows:
+If snappy is installed in a location not normally searched by the
+compiler toolchain, you'll need to modify the \c CPPFLAGS and \c LDFLAGS
+to indicate these locations. For example, with the snappy includes and
+libraries installed in \c /usr/local/include and \c /usr/local/lib, you
+should run configure as follows:
@code
cd build_posix
../configure --enable-snappy CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/include"
@endcode
+When opening the WiredTiger database, load the snappy shared library as
+an extension. For example, with the snappy library installed in
+\c /usr/local/lib, you would use the following extension:
+
+@snippet ex_all.c Configure snappy extension
+
+Finally, when creating the WiredTiger object, set \c block_compressor
+to \c snappy:
+
+@snippet ex_all.c Create a snappy compressed table
+
If necessary, you can confirm the compressor is working by running the
compression part of the test suite: