GIF style LZW decompresser. More...

Public Member Functions | |
| GIFDecoder () | |
| Initialize a GIFDecoder. | |
| const char * | Unpack (uint8_t *pOutput, uintptr_t uOutputLength, InputMemoryStream *pInput) |
| Decompress the image. | |
Static Public Member Functions | |
| static GIFDecoder * | new_object (void) |
| Allocate and initialize a GIFDecoder. | |
Private Member Functions | |
| void | Init (void) |
| Init the LZW permanent tokens. | |
| void | Reset (void) |
| Reset the LZW token tree. | |
| uint_t | GetCode (uint_t uBitsRequested) |
| Get an LZW code token. | |
Private Attributes | |
| InputMemoryStream * | m_pInput |
| Pointer to packed data. | |
| uint_t | m_uBitBucket |
| Current bit bucket. | |
| uint_t | m_uBitCount |
| Current valid bit count in bucket. | |
| uint_t | m_uChunkCount |
| Number of bytes in stream. | |
| uint_t | m_uLZWCodeSize |
| Starting data size. | |
| const uint8_t * | m_LZWTable [4096] |
| Dictionary pointers. | |
| uint8_t | m_LZWArray [256] |
| 0-255 for default data | |
| uint_t | m_LZWSize [4096] |
| Size of each entry. | |
GIF style LZW decompresser.
This class will decompress LZW data in the GIF format
| Burger::GIFDecoder::GIFDecoder | ( | ) |
Initialize a GIFDecoder.
Get an LZW code token.
| uBitsRequested | Number of bits to pull from the byte stream |
|
private |
Init the LZW permanent tokens.
|
static |
Allocate and initialize a GIFDecoder.
|
private |
Reset the LZW token tree.
| const char * Burger::GIFDecoder::Unpack | ( | uint8_t * | pOutput, |
| uintptr_t | uOutputLength, | ||
| InputMemoryStream * | pInput ) |
Decompress the image.
Decompress the LZW compressed image data into a linear buffer
| pOutput | Buffer to accept the decompressed data |
| uOutputLength | Length of the buffer for decompressed data |
| pInput | Data stream to read compressed data from |
|
private |
0-255 for default data
|
private |
Size of each entry.
|
private |
Dictionary pointers.
|
private |
Pointer to packed data.
|
private |
Current bit bucket.
|
private |
Current valid bit count in bucket.
|
private |
Number of bytes in stream.
|
private |
Starting data size.