DWFCore::DWFDecompressingInputStream Class Reference

#include "dwfcore/DecompressingInputStream.h"

Inheritance diagram for DWFCore::DWFDecompressingInputStream:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFDecompressingInputStream:

Collaboration graph
[legend]
List of all members.

Detailed Description

An input stream object that uses zlib to decompress bytes from from another stream.

Since:
1.0.1
This implementation of the DWFInputStream is used to provide zlib inflation for compressed bytes sourced by another input stream.

Definition at line 77 of file DecompressingInputStream.h.

Public Member Functions

_DWFCORE_API DWFDecompressingInputStream (DWFInputStream *pInputStream, bool bOwnStream) throw ()
virtual _DWFCORE_API ~DWFDecompressingInputStream () throw ()
_DWFCORE_API size_t available () const throw ( DWFException )
_DWFCORE_API size_t read (void *pBuffer, size_t nBytesToRead) throw ( DWFException )
_DWFCORE_API off_t seek (int eOrigin, off_t nOffset) throw ( DWFException )


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFDecompressingInputStream::DWFDecompressingInputStream DWFInputStream pInputStream,
bool  bOwnStream
throw ()
 

Constructor

Parameters:
pInputStream An input stream from which to stream the compressed source data. This object should be allocated with the DWFCORE_ALLOC_OBJECT macro if ownership will be transferred.
bOwnStream If true, this object will assume ownership of pInputStream and delete it as necessary using DWFCORE_FREE_OBJECT. If false, the caller retains ownership of pInputStream and is responsible for deleting it.
Exceptions:
None 

virtual _DWFCORE_API DWFCore::DWFDecompressingInputStream::~DWFDecompressingInputStream  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API size_t DWFCore::DWFDecompressingInputStream::available  )  const throw ( DWFException ) [virtual]
 

Used to determine the availability of data remaining in the stream. The byte count returned is determined in the following order: 1. the number of inflated bytes left in the overrun buffer if it isn't empty; 2. if 1 isn't valid, the number of uncompressed bytes, if more than zero, in the z_stream that is pending to inflate will be returned; 3. if both 1 and 2 are not valid, the number of the to be inflated bytes in the original source input stream will be returned.

NOTE: if the returned count is zero, it means the stream has been exhausted and no more bytes can be read out; if the returned count is more than zero, it only means that there are more bytes can be retrieved, but it can NOT indicate the exact bytes that can be read.

Returns:
The number of bytes available to read from the stream.
Exceptions:
DWFException 

Implements DWFCore::DWFInputStream.

_DWFCORE_API size_t DWFCore::DWFDecompressingInputStream::read void *  pBuffer,
size_t  nBytesToRead
throw ( DWFException ) [virtual]
 

that there are no more bytes to read next time. Since, the implementation of this method tries to decompress bytes as more as possibly to fill the input pBuffer.

Parameters:
pBuffer A pointer to a block of memory to receive the bytes.
nBytesToRead The number of bytes to copy into pBuffer. This value should not exceed the capacity of the memory block at pBuffer.
Returns:
The number of uncompressed bytes read into pBuffer.
Exceptions:
DWFException 

Implements DWFCore::DWFInputStream.

_DWFCORE_API off_t DWFCore::DWFDecompressingInputStream::seek int  eOrigin,
off_t  nOffset
throw ( DWFException ) [virtual]
 

Warning:
This method is not implemented and will always throw an exception if invoked.
Parameters:
eOrigin One of SEEK_SET, SEEK_CUR or SEEK_END.
nOffset The number of bytes from eOrigin to move the internal cursor.
Returns:
The previous cursor offset before the seek.
Exceptions:
DWFException 

Implements DWFCore::DWFInputStream.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:35 2009 for Autodesk DWF Core Library by  doxygen 1.4.5