ScummVM API documentation
Sci::DecompressorLZW Class Reference

#include <decompressor.h>

Inheritance diagram for Sci::DecompressorLZW:
Sci::Decompressor

Classes

struct  Tokenlist
 

Public Member Functions

 DecompressorLZW (int nCompression)
 
void init (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked) override
 
int unpack (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked) override
 

Protected Types

enum  { PIC_OPX_EMBEDDED_VIEW = 1, PIC_OPX_SET_PALETTE = 2, PIC_OP_OPX = 0xfe }
 

Protected Member Functions

int unpackLZW1 (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
 
int unpackLZW (Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
 
void reorderPic (byte *src, byte *dest, int dsize)
 
void reorderView (byte *src, byte *dest)
 
void decodeRLE (byte **rledata, byte **pixeldata, byte *outbuffer, int size)
 
int getRLEsize (byte *rledata, int dsize)
 
void buildCelHeaders (byte **seeker, byte **writer, int celindex, int *cc_lengths, int max)
 
- Protected Member Functions inherited from Sci::Decompressor
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

uint16 _numbits
 
uint16 _curtoken
 
uint16 _endtoken
 
int _compression
 
- Protected Attributes inherited from Sci::Decompressor
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
 

Detailed Description

LZW-like decompressor for SCI01/SCI1. TODO: Needs clean-up of post-processing fncs

Member Function Documentation

◆ init()

void Sci::DecompressorLZW::init ( Common::ReadStream src,
byte *  dest,
uint32  nPacked,
uint32  nUnpacked 
)
overridevirtual

Initialize decompressor.

Parameters
srcsource stream to read from
destdestination stream to write to
nPackedsize of packed data
nUnpacketsize of unpacked data
Returns
0 on success, non-zero on error

Reimplemented from Sci::Decompressor.


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