Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AxPipe::Stock::CPipeInflate Class Reference

Decompress with ZLib. More...

#include <CPipeInflate.h>

Inheritance diagram for AxPipe::Stock::CPipeInflate:

Inheritance graph
Collaboration diagram for AxPipe::Stock::CPipeInflate:

Collaboration graph
List of all members.

Public Member Functions

 CPipeInflate ()
 Initialize member variables.

virtual ~CPipeInflate ()
 Release segment if necessary.

bool OutOpen ()
 Initialize ZLib.

bool OutClose ()
 Release segment if necessary.

void Out (CSeg *pSeg)
 Inflate each segment as it arrives.

Private Attributes

longlong m_cb
 Total number of bytes inflated.

z_stream m_Zstream
 ZLIB internal stream control structure.

 Working segment.

Detailed Description

Decompress with ZLib.

Ensure that this file has an extra include directory so zlib.h is found. Also, either include the zlib project as a static or dynamic library, or manually include the following files for compilation with zlib 1.2.1: inflate.c, adler32.c, crc32.c, inffast.c, inftrees.c, zutil.c

If you define NO_GZIP, the executable shrinks and you don't need crc32.c, but you won't be able to default that format.

Definition at line 51 of file CPipeInflate.h.

Constructor & Destructor Documentation

AxPipe::Stock::CPipeInflate::~CPipeInflate  )  [virtual]

Release segment if necessary.

Clean up if necessary, should only need work to be done on error.

Definition at line 49 of file CPipeInflate.cpp.

Member Function Documentation

void AxPipe::Stock::CPipeInflate::Out AxPipe::CSeg pSeg  )  [virtual]

Inflate each segment as it arrives.

Accept each segment as it is passed. It's important that you do not send more data than needed. The compression format is self-terminating, and there must be no data sent after the last byte of the compressed stream. If so, an error is set and that data is discarded. The output is decompressed, but may be sent in multiple segments.

pSeg A segment with compressed data, and no trailing if last

Implements AxPipe::CPipe.

Definition at line 93 of file CPipeInflate.cpp.

References _T, ASSPTR, AxPipe::ERROR_CODE_DERIVED, AxPipe::ERROR_CODE_STOCK, AxPipe::CPipe::GetSeg(), AxPipe::CSeg::Len(), m_cb, m_pOutSeg, m_Zstream, AxPipe::CSeg::PtrRd(), AxPipe::CSeg::PtrWr(), AxPipe::CPipe::Pump(), AxPipe::CSeg::Release(), AxPipe::CError::SetError(), and AxPipe::CSeg::Size().

bool AxPipe::Stock::CPipeInflate::OutClose void   )  [virtual]

Release segment if necessary.

Clean up and call base class CPipe::OutClose()

true to continue cascading the Open()

Reimplemented from AxPipe::CPipe.

Definition at line 77 of file CPipeInflate.cpp.

References m_pOutSeg, and AxPipe::CSeg::Release().

bool AxPipe::Stock::CPipeInflate::OutOpen  )  [virtual]

Initialize ZLib.

Initialize zlib for this inflation.

true to continue cascading of Open()

Reimplemented from AxPipe::CPipe.

Definition at line 58 of file CPipeInflate.cpp.

References _T, ASSCHK, AxPipe::ERROR_CODE_STOCK, m_cb, m_pOutSeg, m_Zstream, and AxPipe::CError::SetError().

The documentation for this class was generated from the following files:
Generated on Mon Feb 2 13:19:29 2004 for AxPipe by doxygen 1.3.5