InflateError
Error codes for DEFLATE / gzip inflation, a direct port of the numeric return values of libtorrent's puff() (src/puff.cpp) and the matching gzip_errors::error_code_enum (include/libtorrent/gzip.hpp).
The integer code is exactly the value puff() returns (plus two gzip-level codes that puff() itself never produces), so anyone cross-referencing the C++ source can map an exception straight back to the original branch. The message strings are copied verbatim from gzip_error_category::message (src/gzip.cpp) so behaviour matches libtorrent's diagnostics.
Note on numbering: libtorrent's gzip_error_category re-maps puff's negative codes onto a positive enum (its inflate_gzip switch turns puff -1..-11 into invalid_block_type .. distance_too_far_back_in_block). Here we keep puff's own signed codes because they're the ground truth of the algorithm; the human-readable text is what libtorrent shows to callers.
Entries
puff 2: bits()/decode() ran off the end of the input (longjmp path).
puff 1: only reachable with a bounded output buffer; we grow instead.
puff -1: block type field was 3 (reserved).
puff -2: stored block LEN did not match ~LEN.
puff -3: dynamic header declared more codes than the format allows.
puff -4: the code-length code itself was not a complete set.
puff -5: a repeat-previous (16) instruction with no previous length.
puff -6: a run-length instruction overran the declared symbol count.
puff -7: literal/length code lengths formed an invalid (over/incomplete) set.
puff -8: distance code lengths formed an invalid set.
puff -9: the dynamic block had no end-of-block symbol.
puff -10: the decoder hit an invalid Huffman code in a fixed/dynamic block.
puff -11: a back-reference distance pointed before the start of output.
gzip-level: the gzip header magic/method/flags were malformed.
gzip-level: inflated output would exceed the caller-supplied maximum.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.