32 #include "dcmtk/config/osconfig.h"
36 #include "dcmtk/dcmdata/dcostrma.h"
64 virtual OFBool
good()
const;
86 virtual offile_off_t
avail()
const;
93 virtual offile_off_t
write(
const void *buf, offile_off_t buflen);
100 virtual void flush();
134 offile_off_t
compress(
const void *buf, offile_off_t buflen, OFBool finalize);
zlib compression filter for output streams
virtual void append(DcmConsumer &consumer)
determines the consumer to which the filter is supposed to write it's output.
z_streamp zstream_
pointer to struct z_stream object containing the zlib status
void compressInputBuffer(OFBool finalize)
feed data from the input ring buffer to the compression codec until complete or the output ring buffe...
DcmConsumer * current_
pointer to consumer to which compressed output is written
offile_off_t inputBufCount_
number of bytes in input ring buffer
DcmZLibOutputFilter & operator=(const DcmZLibOutputFilter &)
private unimplemented copy assignment operator
offile_off_t inputBufStart_
offset of first byte in input ring buffer
virtual void flush()
instructs the consumer to flush its internal content until either the consumer becomes "flushed" or I...
virtual offile_off_t write(const void *buf, offile_off_t buflen)
processes as many bytes as possible from the given input block.
offile_off_t compress(const void *buf, offile_off_t buflen, OFBool finalize)
feed data from the given block of data to the compression codec until complete or the output ring buf...
OFBool flushed_
true if the zlib object has reported Z_STREAM_END
offile_off_t outputBufStart_
offset of first byte in output ring buffer
void flushOutputBuffer()
writes the content of the output ring buffer to the next filter stage until the output ring buffer be...
virtual OFBool isFlushed() const
returns true if the consumer is flushed, i.e.
DcmZLibOutputFilter()
default constructor
OFCondition status_
status
offile_off_t fillInputBuffer(const void *buf, offile_off_t buflen)
copies as much of the given block of data as possible in the input ring buffer
offile_off_t outputBufCount_
number of bytes in output ring buffer
virtual offile_off_t avail() const
returns the minimum number of bytes that can be written with the next call to write().
pure virtual abstract base class for output filters, i.e.
virtual ~DcmZLibOutputFilter()
destructor
unsigned char * inputBuf_
input ring buffer
unsigned char * outputBuf_
output ring buffer
virtual OFCondition status() const
returns the status of the consumer as an OFCondition object.
pure virtual abstract base class for consumers, i.e.
virtual OFBool good() const
returns the status of the consumer.
Template class which allows to declare global objects that are protected by a Mutex if used in multi-...
General purpose class for condition codes.