22 #ifndef SCI_RESOURCE_DECOMPRESSOR_H 23 #define SCI_RESOURCE_DECOMPRESSOR_H 25 #include "common/scummsys.h" 33 enum ResourceCompression {
67 virtual int unpack(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);
78 virtual void init(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);
86 uint32 getBitsMSB(
int n);
94 uint32 getBitsLSB(
int n);
111 virtual void putByte(byte b);
118 return (_dwWrote == _szUnpacked) && (_dwRead >= _szPacked);
136 int unpack(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
override;
150 DecompressorLZW(ResourceCompression compression) : _compression(compression) {}
151 int unpack(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
override;
157 void reorderPic(byte *src, byte *dest,
int dsize);
158 void reorderView(byte *src, byte *dest);
159 void decodeRLE(byte **rledata, byte **pixeldata, byte *outbuffer,
int size);
160 int getRLEsize(byte *rledata,
int dsize);
161 void buildCelHeaders(byte **seeker, byte **writer,
int celindex,
int *cc_lengths,
int max);
163 ResourceCompression _compression;
171 int unpack(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
override;
180 int unpack(
Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked)
override;
184 void copyComp(
int offs, uint32 clen);
190 #endif // SCI_RESOURCE_DECOMPRESSOR_H uint32 _dwRead
number of bytes read from _src
Definition: decompressor.h:125
byte _nBits
number of unread bits in _dwBits
Definition: decompressor.h:122
uint32 _dwBits
bits buffer
Definition: decompressor.h:121
uint32 _dwWrote
number of bytes written to _dest
Definition: decompressor.h:126
Definition: decompressor.h:148
Definition: algorithm.h:29
bool isFinished()
Definition: decompressor.h:117
Definition: decompressor.h:51
uint32 _szPacked
size of the compressed data
Definition: decompressor.h:123
uint32 _szUnpacked
size of the decompressed data
Definition: decompressor.h:124
Definition: decompressor.h:169
Definition: decompressor.h:134