#include <decompressor.h>
Public Member Functions | |
| virtual int | unpack (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked) |
Protected Member Functions | |
| virtual void | init (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked) |
| uint32 | getBitsMSB (int n) |
| uint32 | getBitsLSB (int n) |
| byte | getByteMSB () |
| byte | getByteLSB () |
| void | fetchBitsMSB () |
| void | fetchBitsLSB () |
| virtual void | putByte (byte b) |
| bool | isFinished () |
Protected Attributes | |
| uint32 | _dwBits |
| bits buffer | |
| byte | _nBits |
| number of unread bits in _dwBits | |
| uint32 | _szPacked |
| size of the compressed data | |
| uint32 | _szUnpacked |
| size of the decompressed data | |
| uint32 | _dwRead |
| number of bytes read from _src | |
| uint32 | _dwWrote |
| number of bytes written to _dest | |
| Common::ReadStream * | _src |
| byte * | _dest |
Base class for decompressors. Simply copies nPacked bytes from src to dest.
|
virtual |
Unpack data from source stream to destination buffer.
Reimplemented in Sci::DecompressorDCL, Sci::DecompressorLZW, and Sci::DecompressorHuffman.
|
protectedvirtual |
Initialize decompressor.
| src | source stream to read from |
| dest | destination stream to write to |
| nPacked | size of packed data |
| nUnpacket | size of unpacked data |
|
protected |
Get a number of bits from _src stream, starting with the most significant unread bit of the current four byte block.
| n | number of bits to get |
|
protected |
Get a number of bits from _src stream, starting with the least significant unread bit of the current four byte block.
| n | number of bits to get |
|
protected |
Get one byte from _src stream.
|
protectedvirtual |
Write one byte into _dest stream
| b | byte to put |
|
inlineprotected |
Returns true if all expected data has been unpacked to _dest and there is no more data in _src.