NCBI C++ ToolKit
Classes | Variables
lzo.hpp File Reference

LZO Compression API. More...

#include <util/compress/stream.hpp>
#include <stdio.h>
+ Include dependency graph for lzo.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CLZOCompression
 CLZOCompression –. More...
 
struct  CLZOCompression::SFileInfo
 Structure to keep compressed file information. More...
 
class  CLZOCompressionFile
 CLZOCompressionFile class –. More...
 
class  CLZOBuffer
 CLZOBuffer –. More...
 
class  CLZOCompressor
 CLZOCompressor – LZO based compressor. More...
 
class  CLZODecompressor
 CLZODecompressor – LZO based decompressor. More...
 
class  CLZOStreamCompressor
 CLZOStreamCompressor – lzo based compression stream processor. More...
 
class  CLZOStreamDecompressor
 CLZOStreamDecompressor – lzo based decompression stream processor. More...
 

Variables

const size_t kLZODefaultBlockSize = 24*1024
 Default LZO block size. More...
 

Detailed Description

LZO Compression API.

LZO is a data compression library which is suitable for data (de)compression in real-time. This means it favours speed over compression ratio.

LZO is good to compress some sort of data only, that have a limited set of characters or many recurring sequences. It is not suitable for a random data, that limits its usage. It is better to test compression on yours own data before making decision to use LZO. Use zlib if you need a more universal and robust solution, that is also slower and needs more memory.

We don't support all possible algorithms, implemented in LZO. Only LZO1X is used in this API. Author of LZO says that it is often the best choice of all.

NOTE: LZO is a just an compression algorithm to compress buffers, it doesnt support streaming or file compression out from the box. We use our own stream/file format to add such support.

CLZOCompression - base methods for compression/decompression memory buffers and files. CLZOCompressionFile - allow read/write operations on files. LZO doesn't support files, so we use here our own file format (very simple). CLZOCompressor - LZO based compressor (used in CLZOStreamCompressor). CLZODecompressor - LZO based decompressor (used in CLZOStreamDecompressor). CLZOStreamCompressor - LZO based compression stream processor (see util/compress/stream.hpp for details). CLZOStreamDecompressor - LZO based decompression stream processor (see util/compress/stream.hpp for details).

For more details see LZO documentation: http://www.oberhumer.com/opensource/lzo/

Warning
LZO ia an optional compression component and can be missed on a current platform. It is recommended to guard its usage:

if defined(HAVE_LIBLZO) // use LZO related code here #else // some backup code, or error reporting #endif

See also comments at the beginning of "compress.hpp".

Definition in file lzo.hpp.

Modified on Mon Apr 22 04:06:43 2024 by modify_doxy.py rev. 669887