ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::PackBitsReadStream Class Reference

Decode a given PackBits encoded stream. More...

#include <iff_container.h>

Inheritance diagram for Common::PackBitsReadStream:
Collaboration diagram for Common::PackBitsReadStream:

List of all members.

Public Member Functions

 PackBitsReadStream (Common::ReadStream &input)
 ~PackBitsReadStream ()
virtual bool eos () const
 Returns true if a read failed because the stream end has been reached.
uint32 read (void *dataPtr, uint32 dataSize)
 Read data from the stream.

Protected Attributes

Common::ReadStream_input

Detailed Description

Decode a given PackBits encoded stream.

PackBits is an RLE compression algorithm introduced by Apple. It is also used to encode ILBM and PBM subtypes of IFF files, and some flavors of TIFF.

As there is no compression across row boundaries in the above formats, read() will extract a *new* line on each call, discarding any alignment or padding.

Definition at line 254 of file iff_container.h.


Constructor & Destructor Documentation

Common::PackBitsReadStream::PackBitsReadStream ( Common::ReadStream input  ) 

Definition at line 80 of file iff_container.cpp.

Common::PackBitsReadStream::~PackBitsReadStream (  ) 

Definition at line 83 of file iff_container.cpp.


Member Function Documentation

bool Common::PackBitsReadStream::eos (  )  const [virtual]

Returns true if a read failed because the stream end has been reached.

This flag is cleared by clearErr(). For a SeekableReadStream, it is also cleared by a successful seek.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C feof(). In particular, in a stream with N bytes, reading exactly N bytes from the start should *not* set eos; only reading *beyond* the available data should set it.

Implements Common::ReadStream.

Definition at line 86 of file iff_container.cpp.

uint32 Common::PackBitsReadStream::read ( void *  dataPtr,
uint32  dataSize 
) [virtual]

Read data from the stream.

Subclasses must implement this method; all other read methods are implemented using it.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C fread(), in particular where it concerns setting error and end of file/stream flags.
Parameters:
dataPtr pointer to a buffer into which the data is read
dataSize number of bytes to be read
Returns:
the number of bytes which were actually read.

Implements Common::ReadStream.

Definition at line 90 of file iff_container.cpp.


Member Data Documentation


The documentation for this class was generated from the following files:


Generated on Sat Jan 19 2019 05:05:51 for ResidualVM by doxygen 1.7.1
curved edge   curved edge