Gzip data compression More...
#include <LDM/compressors/SoGzipDataCompressor.h>
Public Member Functions | |
SoGzipDataCompressor () | |
Constructor. | |
virtual | ~SoGzipDataCompressor () |
Destructor. | |
virtual size_t | compress (void *src, size_t srcLen, const TileInfo &tileInfo) |
Compresses the given buffer into the internal buffer. | |
virtual size_t | uncompress (void *dest, size_t destLen, const TileInfo &tileInfo) |
Uncompresses data from the internal buffer to the given buffer. | |
virtual SbString | getCompressionFormatName () const |
Returns the name of the compression algorithm used by this class. | |
virtual bool | isLossless () |
This compression is lossless. | |
Public Member Functions inherited from SoDataCompressor | |
SoDataCompressor () | |
Constructor. | |
virtual | ~SoDataCompressor () |
Destructor. | |
virtual void | setCompressionLevel (size_t level) |
Sets the compression level. | |
virtual void * | allocateCompressedBuffer (size_t size) |
Allocates the internal buffer to hold the compressed data. | |
virtual void * | getCompressedBuffer () |
Returns the compressed data. | |
virtual size_t | getCompressionLevel () |
Returns the compression level. | |
Public Member Functions inherited from SoTypedObject | |
virtual SoType | getTypeId () const =0 |
Returns the type identifier for a specific instance. | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Additional Inherited Members | |
Static Public Member Functions inherited from SoDataCompressor | |
static SoDataCompressor * | getAppropriateCompressor (const SbString &name) |
Create and return an instance of a compressor of the given type. | |
static SbStringList | getAvailableCompressors () |
Return a list of all available compressors. | |
static size_t | crc32 (const void *buf, size_t len) |
Utility function to get the CRC32 of a buffer. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
This class implements a compression scheme based on zlib. It is a lossless compression and can be used on any data set type.
The setCompressionLevel method (inherited from SoDataCompressor or in SoConverterParameters) accepts values between 0 and 9. 0 gives no compression, 9 gives best compression but slower speed. Default is 3.
SoJpegDataCompressor, SoDataCompressor, SoConverterParameters
Definition at line 53 of file SoGzipDataCompressor.h.
SoGzipDataCompressor::SoGzipDataCompressor | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Compresses the given buffer into the internal buffer.
src | a pointer to the data to compress. |
srcLen | the size of the source buffer in bytes. |
tileInfo | contains information about the tile being processed. |
Implements SoDataCompressor.
|
inlinevirtual |
Returns the name of the compression algorithm used by this class.
This is the name the user must pass to the "-c" option of the converter to use this compression ("gzip" here).
Implements SoDataCompressor.
Definition at line 92 of file SoGzipDataCompressor.h.
|
inlinevirtual |
This compression is lossless.
Implements SoDataCompressor.
Definition at line 98 of file SoGzipDataCompressor.h.
|
virtual |
Uncompresses data from the internal buffer to the given buffer.
dest | a pointer to the destination buffer. |
destLen | the size of the destination buffer. |
tileInfo | contains information about the tile being processed |
Implements SoDataCompressor.