CMS 3D CMS Logo

lat::InteractiveDecompressor Class Reference

Non-blocking, incremental and interactive decompressor front-end. More...

#include <Iguana/Utilities/classlib/zip/InteractiveDecompressor.h>

List of all members.

Public Types

enum  { DEFAULT_BUF_SIZE = 4096 }

Public Member Functions

virtual void begin (void)
virtual ~InteractiveDecompressor (void)

Protected Member Functions

virtual void decompress (void)
virtual void doInput (void)
virtual void doOutput (void)
virtual void finish (void)
virtual bool flush (void)
 InteractiveDecompressor (Decompressor *decompressor, InputStream *input=0, OutputStream *output=0, IOSize inBufSize=DEFAULT_BUF_SIZE, IOSize outBufSize=DEFAULT_BUF_SIZE)
virtual void setInputStream (InputStream *input)
virtual void setOutputStream (OutputStream *output)
virtual void waitForInput (void)
virtual void waitForOutput (void)

Protected Attributes

IOSize m_bottom
Decompressorm_decompressor
unsigned char * m_inBuf
IOSize m_inBufSize
InputStreamm_input
bool m_inputting
IOSize m_out
unsigned char * m_outBuf
IOSize m_outBufSize
OutputStreamm_output
bool m_outputting

Private Member Functions

 InteractiveDecompressor (const InteractiveDecompressor &)
InteractiveDecompressoroperator= (const InteractiveDecompressor &)


Detailed Description

Non-blocking, incremental and interactive decompressor front-end.

This class can be used to run a on non-blocking input and/or output or when the should be ran interactively on limited amounts of data at a time.

This class processes both input and output in chunks, the upper limits of the chunk sizes for both input and output are given as constructor arguments. At most one full chunk of input or output data is processed at a time even if the streams could handle more.

A can consume arbitrary amounts of input before producing any output, and even a small amount of input can produce large amounts of output. This class guarantees the partitioning of the input and output to at most the chunk sizes mentioned above, while at the same time remaining responsive to the maximum bandwiths of the input and output streams -- within the limits of the 's abilities.

This class must be inherted from to implement the input and output notification scheme. On call to waitForInput() doInput() should be registered to handle the input becoming readable. Similarly on call to waitForOutput() doOutput() should be registered to handle the output becoming writable.

Definition at line 46 of file InteractiveDecompressor.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
DEFAULT_BUF_SIZE 

Definition at line 49 of file InteractiveDecompressor.h.

00049 { DEFAULT_BUF_SIZE = 4096 };


Constructor & Destructor Documentation

virtual lat::InteractiveDecompressor::~InteractiveDecompressor ( void   )  [virtual]

lat::InteractiveDecompressor::InteractiveDecompressor ( Decompressor decompressor,
InputStream input = 0,
OutputStream output = 0,
IOSize  inBufSize = DEFAULT_BUF_SIZE,
IOSize  outBufSize = DEFAULT_BUF_SIZE 
) [protected]

lat::InteractiveDecompressor::InteractiveDecompressor ( const InteractiveDecompressor  )  [private]


Member Function Documentation

virtual void lat::InteractiveDecompressor::begin ( void   )  [virtual]

virtual void lat::InteractiveDecompressor::decompress ( void   )  [protected, virtual]

virtual void lat::InteractiveDecompressor::doInput ( void   )  [protected, virtual]

virtual void lat::InteractiveDecompressor::doOutput ( void   )  [protected, virtual]

virtual void lat::InteractiveDecompressor::finish ( void   )  [protected, virtual]

virtual bool lat::InteractiveDecompressor::flush ( void   )  [protected, virtual]

InteractiveDecompressor& lat::InteractiveDecompressor::operator= ( const InteractiveDecompressor  )  [private]

virtual void lat::InteractiveDecompressor::setInputStream ( InputStream input  )  [protected, virtual]

virtual void lat::InteractiveDecompressor::setOutputStream ( OutputStream output  )  [protected, virtual]

virtual void lat::InteractiveDecompressor::waitForInput ( void   )  [protected, virtual]

virtual void lat::InteractiveDecompressor::waitForOutput ( void   )  [protected, virtual]


Member Data Documentation

IOSize lat::InteractiveDecompressor::m_bottom [protected]

Definition at line 86 of file InteractiveDecompressor.h.

Decompressor* lat::InteractiveDecompressor::m_decompressor [protected]

Definition at line 75 of file InteractiveDecompressor.h.

unsigned char* lat::InteractiveDecompressor::m_inBuf [protected]

Definition at line 78 of file InteractiveDecompressor.h.

IOSize lat::InteractiveDecompressor::m_inBufSize [protected]

Definition at line 79 of file InteractiveDecompressor.h.

InputStream* lat::InteractiveDecompressor::m_input [protected]

Definition at line 77 of file InteractiveDecompressor.h.

bool lat::InteractiveDecompressor::m_inputting [protected]

Definition at line 80 of file InteractiveDecompressor.h.

IOSize lat::InteractiveDecompressor::m_out [protected]

Definition at line 85 of file InteractiveDecompressor.h.

unsigned char* lat::InteractiveDecompressor::m_outBuf [protected]

Definition at line 83 of file InteractiveDecompressor.h.

IOSize lat::InteractiveDecompressor::m_outBufSize [protected]

Definition at line 84 of file InteractiveDecompressor.h.

OutputStream* lat::InteractiveDecompressor::m_output [protected]

Definition at line 82 of file InteractiveDecompressor.h.

bool lat::InteractiveDecompressor::m_outputting [protected]

Definition at line 87 of file InteractiveDecompressor.h.


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:26 2009 for CMSSW by  doxygen 1.5.4