Public Member Functions | |
DcmRLEDecoder (size_t outputBufferSize) | |
constructor | |
~DcmRLEDecoder () | |
destructor | |
void | clear () |
resets the decoder object to newly constructed state. | |
OFCondition | decompress (void *compressedData, size_t compressedSize) |
size_t | size () const |
returns the number of bytes written to the output buffer | |
void * | getOutputBuffer () const |
returns pointer to the output buffer | |
OFBool | fail () const |
returns true if the RLE compressor has failed (out of memory or output buffer too small). | |
Private Member Functions | |
DcmRLEDecoder (const DcmRLEDecoder &) | |
private undefined copy constructor | |
DcmRLEDecoder & | operator= (const DcmRLEDecoder &) |
private undefined copy assignment operator | |
void | replicate (unsigned char ch, unsigned char nbytes) |
this method expands a replicate run | |
void | literal (unsigned char *cp, unsigned char nbytes) |
this method expands a literal run | |
Private Attributes | |
int | fail_ |
this flag indicates a failure of the RLE codec. | |
size_t | outputBufferSize_ |
size of output buffer, in bytes | |
unsigned char * | outputBuffer_ |
this member points to a block of size outputBufferSize_ (unless fail_ is true). | |
size_t | offset_ |
contains the number of bytes already written to outputBuffer_. | |
unsigned char | suspendInfo_ |
contains suspension information. |
The class is loosely based on an implementation by Phil Norman <forrey@eh.org>
Definition at line 43 of file dcrledec.h.
|
constructor
Definition at line 51 of file dcrledec.h. References fail_, outputBuffer_, and outputBufferSize_. |
|
resets the decoder object to newly constructed state. The size and location of the output buffer is not changed. Definition at line 75 of file dcrledec.h. References fail_, offset_, outputBuffer_, and suspendInfo_. |
|
this method expands a literal run
Definition at line 233 of file dcrledec.h. References fail_, offset_, outputBuffer_, and outputBufferSize_. Referenced by decompress(). |
|
this method expands a replicate run
Definition at line 216 of file dcrledec.h. References fail_, offset_, outputBuffer_, and outputBufferSize_. Referenced by decompress(). |
|
returns the number of bytes written to the output buffer
Definition at line 184 of file dcrledec.h. References offset_. |
|
this flag indicates a failure of the RLE codec. Once a failure is flagged, the codec will consume all input and not produce any more output. Definition at line 251 of file dcrledec.h. Referenced by clear(), DcmRLEDecoder(), decompress(), fail(), literal(), and replicate(). |
|
contains the number of bytes already written to outputBuffer_. Value is always less or equal to outputBufferSize_. Definition at line 266 of file dcrledec.h. Referenced by clear(), literal(), replicate(), and size(). |
|
this member points to a block of size outputBufferSize_ (unless fail_ is true). This is the block of data to which the decompressed stream is written Definition at line 261 of file dcrledec.h. Referenced by clear(), DcmRLEDecoder(), getOutputBuffer(), literal(), replicate(), and ~DcmRLEDecoder(). |
|
contains suspension information. If not suspended, contains 128. If suspended during a replicate run, contains control byte of repeat run (> 128). If suspended during a literal run, contains number of remaining bytes in literal run minus 1 (< 128). Definition at line 273 of file dcrledec.h. Referenced by clear(), and decompress(). |