![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
A DEFLATE stream being read. More...
#include <deflate.h>
Public Attributes | |
| TinyBitReader | bits |
| uint8_t * | window |
| size_t | head |
| size_t | pending |
| size_t | tail |
| TinyHuffman * | literals |
| TinyHuffman * | distances |
| int | done |
| int | inside |
| int | final |
| int | mode |
| size_t | stored |
| int | zlib |
| uint32_t | adler_a |
| uint32_t | adler_b |
| int | error |
A DEFLATE stream being read.
Output is produced on demand into a ring window rather than into one buffer the size of the decompressed data, which is what lets the PNG codec unfilter row by row and keep only the rows a region actually needs.
The input has to be contiguous. PNG's compressed data arrives split across IDAT chunks, so the codec concatenates them first; that costs a second copy of the compressed bytes, which is small beside the decoded image and avoids a second bit reader that understands segments.
| uint32_t TinyInflate::adler_a |
Low half of the running Adler-32, folded in as bytes are handed out.
| uint32_t TinyInflate::adler_b |
High half of the running Adler-32.
| TinyBitReader TinyInflate::bits |
The compressed bytes, read least significant bit first.
| TinyHuffman* TinyInflate::distances |
Distance codes for the block being read.
| int TinyInflate::done |
Non-zero once the final block's last symbol has been read.
| int TinyInflate::error |
The first failure, latched.
| int TinyInflate::final |
Non-zero when the block being read is the last one.
| size_t TinyInflate::head |
Where the next produced byte goes.
| int TinyInflate::inside |
Non-zero while inside a block rather than between blocks.
| TinyHuffman* TinyInflate::literals |
Literal and length codes for the block being read.
| int TinyInflate::mode |
The current block's type, as RFC 1951 numbers them.
| size_t TinyInflate::pending |
Produced but not yet handed to the caller.
| size_t TinyInflate::stored |
Bytes left in a stored block.
| size_t TinyInflate::tail |
Where the next handed out byte comes from.
| uint8_t* TinyInflate::window |
Ring of already produced output, TINY_DEFLATE_WINDOW bytes.
| int TinyInflate::zlib |
Non-zero when a zlib header was consumed and a trailer is expected.