LibreOffice Module hwpfilter (master) 1
|
#include <zlib.h>
Go to the source code of this file.
Classes | |
struct | gz_stream |
Structure for using z_stream. More... | |
Functions | |
gz_stream * | gz_open (HStream &_stream) |
Opens a gzipped stream for reading. More... | |
int | gz_close (gz_stream *file) |
Flushes all pending output if necessary, closes the compressed stream and deallocates all the (de)compression state. More... | |
size_t | gz_read (gz_stream *file, voidp buf, unsigned len) |
Reads the given number of uncompressed bytes from the compressed stream. More... | |
int | gz_flush (gz_stream *file, int flush) |
Flushes all pending output into the compressed file gz_flush should be called only when strictly necessary because it can degrade compression. More... | |
Flushes all pending output if necessary, closes the compressed stream and deallocates all the (de)compression state.
Definition at line 278 of file hgzip.cxx.
References gz_stream::crc, destroy(), err, gz_flush(), gz_stream::mode, and gz_stream::stream.
Referenced by HStreamIODev::setCompressed(), and HStreamIODev::~HStreamIODev().
Flushes all pending output into the compressed file gz_flush should be called only when strictly necessary because it can degrade compression.
flush | Is as in the deflate() function |
Definition at line 215 of file hgzip.cxx.
References gz_stream::mode, gz_stream::stream, Z_BUFSIZE, and gz_stream::z_err.
Referenced by HStreamIODev::flush(), gz_close(), and HStreamIODev::setCompressed().
Opens a gzipped stream for reading.
gz_open returns NULL if the stream could not be opened or if there was insufficient memory to allocate the (de)compression state; errno can be checked to distinguish the two cases (if errno is zero, the zlib error is Z_MEM_ERROR).
_stream | Reference of stream object having binary data. |
Definition at line 47 of file hgzip.cxx.
References gz_stream::_inputstream, ALLOC, Byte, gz_stream::crc, destroy(), err, gz_stream::inbuf, gz_stream::mode, gz_stream::msg, gz_stream::stream, Z_BUFSIZE, gz_stream::z_eof, and gz_stream::z_err.
Referenced by HStreamIODev::setCompressed().
size_t gz_read | ( | gz_stream * | file, |
voidp | buf, | ||
unsigned | len | ||
) |
Reads the given number of uncompressed bytes from the compressed stream.
file | Gzipped stream |
buf | Buffer to have the data to be read |
len | Length of data to be read |
Definition at line 151 of file hgzip.cxx.
References gz_stream::_inputstream, gz_stream::crc, getLong(), gz_stream::inbuf, HStream::readBytes(), start, gz_stream::stream, Z_BUFSIZE, gz_stream::z_eof, and gz_stream::z_err.