| Catalina Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
#define CATALINA_ZLIB_TRANSFORM_ERROR enum CatalinaZlibTransformError; CatalinaZlibTransformPrivate; CatalinaZlibTransform; CatalinaTransform* catalina_zlib_transform_new (void); GQuark catalina_zlib_transform_error_quark (void);
Provides a CatalinaTransform implementation that can read and write zlib compressed data.
The compressed data includes as little as 1 byte and as many as 5 bytes on the tail end of the compressed data. The consumer of this will never know however, as the transform hides this detail. The last byte is always attached and it is 1 if the stream was compressed and 0 if the stream was not compressed. This is important as some data-sets are small enough where compression does not make sense and actually slows processing down. You can tune this to your data-set using the "watermark" property. The input length must be greater than the watermark to be compressed. The default is 0.
If the data is compressed, the 4 bytes previous to the last byte will contain the length of the uncompressed buffer. This is so that we may do a single allocation on decompression to save ourselves lots of allocations and joining into a single buffer later.
#define CATALINA_ZLIB_TRANSFORM_ERROR (catalina_zlib_transform_error_quark ())
CatalinaZlibTransform GError domain.
typedef enum {
CATALINA_ZLIB_TRANSFORM_ERROR_ZLIB,
} CatalinaZlibTransformError;
CatalinaZlibTransform error enumeration.
typedef struct _CatalinaZlibTransformPrivate CatalinaZlibTransformPrivate;
CatalinaTransform* catalina_zlib_transform_new (void);
Creates a new instance of CatalinaZlibTransform.
Returns : |
the newly created CatalinaZlibTransform instance |