Files
Claude 4978207531 std/brotli: add a brotli decoder with parity to libbrotlidec v1.2.1
This is the first milestone of a byte-exact rewrite of brotli (reference
implementation tag v1.2.1) in Wuffs. The decoder mirrors c/dec/decode.c
function by function, including its validation checks: the same output for
valid input and the same verdict, with each BROTLI_DECODER_ERROR_FORMAT_*
code mapped to a Wuffs status (see std/brotli/README.md). The C state
machine is replaced by Wuffs coroutines, so decoding works with arbitrarily
small src and dst buffers.

The history window lives in the caller's workbuf. Huffman table groups,
context maps and the static dictionary scratch space live in the decoder
struct. The static dictionary, transforms, context lookup tables and prefix
code tables in common_tables.wuffs are generated from the brotli source by
script/print-brotli-tables.go.

Tests: golden tests on the upstream tests/testdata vectors and on streams
produced by the v1.2.1 CLI at several qualities and window sizes, 1-byte
I/O limits, truncation at every prefix, malformed inputs per error code,
trailing data and workbuf boundaries. With -mimic, every vector and every
malformed input is also compared against libbrotlidec, including the exact
error code. A differential run over about a million mutated inputs found
no divergence.

Not yet supported (left as TODOs): large-window brotli, custom/shared
dictionaries, metadata callbacks and fast paths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NoosQNe7DKWnqDCBeqw1p
2026-10-26 22:46:34 +00:00

13 lines
706 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
The following table shows code page 852. Each character is shown with its equivalent Unicode code point. Only the second half of the table (128–255) is shown, the first half (0–127) being the same as code page 437.
Code page 852
0 1 2 3 4 5 6 7 8 9 A B C D E F
8x Ç ü é â ä ů ć ç ł ë Ő ő î Ź Ä Ć
9x É Ĺ ĺ ô ö Ľ ľ Ś ś Ö Ü Ť ť Ł × č
Ax á í ó ú Ą ą Ž ž Ę ę ¬ ź Č ş « »
Bx ░ ▒ ▓ │ ┤ Á Â Ě Ş ╣ ║ ╗ ╝ Ż ż ┐
Cx └ ┴ ┬ ├ ─ ┼ Ă ă ╚ ╔ ╩ ╦ ╠ ═ ╬ ¤
Dx đ Đ Ď Ë ď Ň Í Î ě ┘ ┌ █ ▄ Ţ Ů ▀
Ex Ó ß Ô Ń ń ň Š š Ŕ Ú ŕ Ű ý Ý ţ ´
Fx SHY ˝ ˛ ˇ ˘ § ÷ ¸ ° ¨ ˙ ű Ř ř ■ NBSP