tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyInflate Struct Reference

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
TinyHuffmanliterals
TinyHuffmandistances
int done
int inside
int final
int mode
size_t stored
int zlib
uint32_t adler_a
uint32_t adler_b
int error

Detailed Description

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.

Member Data Documentation

◆ adler_a

uint32_t TinyInflate::adler_a

Low half of the running Adler-32, folded in as bytes are handed out.

◆ adler_b

uint32_t TinyInflate::adler_b

High half of the running Adler-32.

◆ bits

TinyBitReader TinyInflate::bits

The compressed bytes, read least significant bit first.

◆ distances

TinyHuffman* TinyInflate::distances

Distance codes for the block being read.

◆ done

int TinyInflate::done

Non-zero once the final block's last symbol has been read.

◆ error

int TinyInflate::error

The first failure, latched.

◆ final

int TinyInflate::final

Non-zero when the block being read is the last one.

◆ head

size_t TinyInflate::head

Where the next produced byte goes.

◆ inside

int TinyInflate::inside

Non-zero while inside a block rather than between blocks.

◆ literals

TinyHuffman* TinyInflate::literals

Literal and length codes for the block being read.

◆ mode

int TinyInflate::mode

The current block's type, as RFC 1951 numbers them.

◆ pending

size_t TinyInflate::pending

Produced but not yet handed to the caller.

◆ stored

size_t TinyInflate::stored

Bytes left in a stored block.

◆ tail

size_t TinyInflate::tail

Where the next handed out byte comes from.

◆ window

uint8_t* TinyInflate::window

Ring of already produced output, TINY_DEFLATE_WINDOW bytes.

◆ zlib

int TinyInflate::zlib

Non-zero when a zlib header was consumed and a trailer is expected.


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