Skip to documentation
SLOP

tiny.deflate.Error

Reference tiny.deflate Error

Defined in tiny.deflate.

Every way decompress can fail, for a caller to switch on and tell a buffer that is too small from input that is bad.

API (14)

Fields and members

Public fields and members.

No direct callersNo direct callstiny.deflateError
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/deflate/src/model.zig:57

zig
/// Every way `decompress` can fail, for a caller to switch on and tell a buffer that is too small/// from input that is bad. The PDF reader separates `OutputTooSmall`, which means the output buffer/// ran out, from every other tag, which it treats as undecodable input.pub const Error = error{    /// The expanded data does not match the Adler-32 in a zlib trailer or the CRC-32 in a gzip    /// trailer. The call also returns this error when a gzip header checksum does not match the    /// header bytes.    BadChecksum,    /// A zlib header names a method other than 8, names a window above 32 KiB, or fails its check    /// value. The call also returns this error when a gzip header lacks the bytes 1f 8b, names a    /// method other than 8, or sets a reserved flag bit.    BadHeader,    /// The length in a gzip trailer differs from the expanded length modulo 2^32. The call also    /// returns this error under exact output when the expanded data is shorter than `output`.    BadSize,    /// A block header names block type 3, which DEFLATE reserves.    InvalidBlockType,    /// The compressed data holds a pattern of bits that matches no code in the current table, or a    /// length or distance symbol that the format leaves unused.    InvalidCode,    /// A back-reference reaches further back than the bytes written so far.    InvalidDistance,    /// The header of a block that carries its own code tables is malformed. The cases are too many    /// literal and length codes, a repeat instruction with nothing before it or one that runs past    /// the end, or code lengths that form no valid Huffman code.    InvalidDynamicHeader,    /// The package raises this error when a list of code lengths forms no valid Huffman code.    /// `decompress` reports every such failure as `InvalidDynamicHeader`, so a caller of    /// `decompress` never receives this tag.    InvalidHuffmanTree,    /// A block that carries its own code tables gives the end-of-block symbol no code, so the block    /// could never end.    MissingEndOfBlock,    /// The expanded data needs more bytes than `output` has left. The PDF reader turns this tag,    /// the one tag about the caller's buffer, into its own capacity error.    OutputTooSmall,    /// A zlib header sets the flag that asks for a preset dictionary, which the package does not    /// support.    PresetDictionaryUnsupported,    /// Exact input is on and bytes remain in `input` after the frame. A second gzip member joined    /// after the first ends here.    TrailingInput,    /// The input ends before the frame does: inside a header, inside the compressed data, or before    /// the trailer. A zlib input under 6 bytes or a gzip input under 18 bytes fails here before any    /// decoding.    TruncatedInput,    /// The length of an uncompressed block does not match the complement stored after it.    WrongStoredLength,};

Source: lib/deflate/src/root.zig:49

zig
pub const Error = model.Error;

Audit

Definitions1
Public names1
Members14
Version26.7.0
Revisiondaab053ee433