![]() |
![]() |
![]() |
GSK Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GskZlibDeflator; GskStream * gsk_zlib_deflator_new (gint compression_level, int flush_millis);
A stream which compresses data on its input to its output. This is the raw zlib deflated data. See RFCs 1950 and 1951.
We use the implementation in a shared library -lz.
typedef struct { GskStream stream; gpointer private_stream; GskBuffer compressed; guint level; gint flush_millis; GskSource *flush_source; gboolean use_gzip; } GskZlibDeflator;
A zlib deflator (compressor) object. One writes raw data to it, and one can read the compressed data from it.
GskStream |
parent instance. |
gpointer |
zlib library object. |
GskBuffer |
buffer of compressed data. |
guint |
compressor level (private). |
gint |
milliseconds to wait to flush the buffer or -1 to indicate that flush need only be done at end-of-file. |
GskSource * |
private: flush timeout source. |
gboolean |
GskStream * gsk_zlib_deflator_new (gint compression_level, int flush_millis);
Create a new Zlib deflation stream. This stream is written uncompressed input, and then compressed output can be read back from it.
|
the level of compression to attain in exchange for running slower. |
|
number of milliseconds to wait before flushing all input characters to the output. Use -1 to not set timeouts, which means the buffers are only flushed after a write-shutdown. |
Returns : |
the newly allocated deflator. |