Repository navigation
Releases
Releases · hustcer/fbr
v0.8.2
v0.8.2
Performance
- Removed the natural 3-byte LZ77 parse candidate and its writer pass from
q4-q8; q3 and below keep it. In the interleaved same-time comparison against
v0.8.1, aggregate q4-q8 encode time decreased by 20.6%: native 64 KiB and
128 KiB rows by 16.5%-25.5%, wasm-gc rows by 16.3%-23.6%. Encoded size was
unchanged on every measured row, including Silesia 2 MiB. Candidates are
selected by exact cost, so dropping one can only leave output unchanged or
larger; no measured input regressed. - Cached the identity and mixed static-dictionary encode indexes for the
process lifetime and materialized each entry's transformed output bytes into
a flat pool, replacing per-byte transform re-derivation during match
verification. In the same-time comparison, q10 encode time decreased by
16.4% (native) and 13.5% (wasm-gc) on 64 KiB and by 10.5% and 7.8% on
128 KiB; q9 64 KiB decreased by 10.8% and 11.9%; q11 rows decreased by 0.8%
to 5.2%. Encoded output is byte-identical. Once a dictionary candidate has
run, the caches retain about 2.4 MB (mixed) and 7.9 MB (identity) for the
process lifetime; nothing is retained before that.
Tests
- Added white-box coverage verifying that the materialized dictionary output
pool matches the per-byte transform machinery it replaced, and that both
index caches return the same instance on repeat calls.
v0.8.1
v0.8.1
Changed
- Migrated the module manifest from
moon.mod.jsontomoon.modand updated
the codebase for the current MoonBit formatter and checker without changing
the public API. - Enabled the bounded optimal-parse pass for q11 chunks up to 1 MiB. On the
measured Silesia inputs, q11 output decreased from 21,302 to 20,904 bytes at
64 KiB and from 264,341 to 256,952 bytes at 1 MiB, with higher encode time.
Performance
- Reduced q2 encode time by 11.3% on native and 13.4% on wasm-gc for the
measured 64 KiB input, with encoded size unchanged. - Adjusted recent-distance probing for q4-q8. Across the measured 64 KiB and
128 KiB rows, aggregate encode time decreased by 10.6% and aggregate encoded
size increased by 0.116%.
Tools and docs
- Updated the release benchmark report and checked-in benchmark data.
- Fixed the release validation script for Nushell 0.114 strict return-type
checking by returning elapsed milliseconds as an integer.
v0.8.0
v0.8.0
Changed
- Changed Brotli q0/q1 encoding from stored-only meta-blocks to compressed
low-quality streams. - Tuned q0/q1 low-quality search and writer selection for a practical
speed/size balance while keeping the measured q2 guard rows unchanged.
Performance
- On the Silesia 64 KiB and 128 KiB benchmark slices, q0/q1 encoded sizes are
now within +2.38% of Google Brotli in the measured rows. - In the same target-perf runs, q0 native encode min time was 3.95 ms versus
Google Brotli 4.21 ms on 64 KiB; q1 native encode min time was 4.85 ms
versus Google Brotli 4.30 ms on 64 KiB.
v0.7.1
v0.7.1
Performance
- Widened the Brotli decoder bit-reader accumulator to 64 bits so a 4-byte
refill can be appended without discarding remaining buffered bits. Same-time
decode-comparevalidation passed across the checkedwasm-gcand native
rows, with an aggregate decode improvement of about 1.1% in that run.
Compatibility
- Updated internal checked-error handling and tests for
mooncv0.10.0
warnings without changing the public API.
Tools and docs
- Removed the native benchmark
cc-o0compiler workaround now that default
native release builds complete reliably with the current MoonBit toolchain. - Changed the benchmark report and decode comparison defaults to
--repeats 20, and documented that MoonBit timings amortize onemoon run
process startup across repeats. - Regenerated
docs/brotli_release_report.mdand the checked-in current
benchmark JSONL files with the updated harness.
v0.7.0
v0.7.0
Changed
UnbrotliStreamnow decodes incrementally: it emits output throughondata
as complete Brotli meta-blocks become available (intermediate calls report
is_final=false), instead of buffering all input and emitting once on the
finalpush. Consumers that assumed a singleondatacall with the whole
result must now concatenate the emitted chunks.UnbrotliStreamnow ignoresUnbrotliOptions.out; streaming output is
delivered only throughondata. One-shotunbrotli_syncstill honorsout.UnbrotliStream::pushnow rejects non-empty input pushed after the stream has
finished.
Added
BrotliDistanceRing::clonein thecommonpackage, used by the streaming
decoder to speculatively decode a meta-block and roll back on short input.
Tests
- Added
UnbrotliStreamcoverage: output equivalence against one-shot
unbrotli_syncacross every input split point, byte-at-a-time decoding,
max_input_sizeenforcement, post-finish rejection, the empty-input final
marker, and truncated-input errors. - Added white-box coverage for
common,decode, andencodehelpers.
Tools and docs
- Documented the
UnbrotliStreamstreaming trade-offs in the README: output is
retained for the stream lifetime (memory is not window-bounded), eachpush
may re-decode the in-progress meta-block, andoutis ignored. - Reworked the coverage-analysis script (
tools/analyze-coverage.nu) and
COVERAGE_ANALYSIS.md.
v0.6.0
v0.6.0
Performance
- Adjusted Brotli encoder candidate gating for quality levels 3 through 11.
The current selection keeps intermediate LZ77 candidates for q4-q8, narrows
four-byte high-quality and mixed-dictionary candidates to q10/q11, and avoids
several q3/q9 candidate passes that were recorded as rejected trials. - In the regenerated
just benchreport, q3 encode min timings improve by
1.78x-2.49x versus v0.5.0 on the Silesia 64 KiB and 128 KiB inputs. The q3
output size increases by 3.3% on 64 KiB and 4.2% on 128 KiB. - The same report shows q9 encode min timings improving by 1.57x-3.48x. The
64 KiB q9 output is unchanged; the 128 KiB q9 output grows from 38,926 to
40,207 bytes, changing its Google-size delta from -1.46% to +1.78%. - q10 and q11 encode min timings improve by 1.33x-1.54x with unchanged output
size in the measured rows. q2 also improves by 1.10x-1.23x with unchanged
output size. - q0 and q1 output sizes are unchanged, with measured min timings 2.7%-13.8%
slower. q4 through q8 output sizes are unchanged, with measured min timings
ranging from 10.6% faster to 7.6% slower depending on quality, target, and
input. - Added small decoder hot-path changes for command info lookup, short-distance
handling, explicit distance decoding, and validated Huffman tree-group access.
The regenerated decode report shows native min timings 5.7%-7.4% faster than
v0.5.0; wasm-gc rows range from 3.6% faster to 0.3% slower.
Tools and docs
- Moved Brotli tooling from
tools/brotli/to directtools/subdirectories
and updatedjustrecipes and documentation paths. - Added same-time benchmark harnesses for comparing encode and decode behavior
against a baseline git ref. - Updated the size verification script to report
sizeas a filesize value and
to select native.exeartifacts explicitly. - Documented recent
js,wasm-gc, andnativesize-verification results in
the README.
Tests
- Added white-box coverage for context-map validation, command-info table
lookup, validated short-distance decoding, explicit distance formulas, and
encoder candidate gating.
v0.5.0
v0.5.0
Performance
- Improved Brotli q4-q8 encode time by pruning expensive candidate passes,
reusing match-chain tables, disabling lazy matching for those qualities, and
preferring the context8 writer when applicable. - In the
5591fe6target-perfreport, q4-q8 encode min timings improved
from v0.3.1 by 2.15x-3.01x onwasm-gcand 3.08x-3.95x on native for the
Silesia 64 KiB input, and by 2.57x-3.25x onwasm-gcand 3.39x-4.88x on
native for the Silesia 128 KiB input. The same benchmark rows grew output
size by 1.77%-2.63%. - The same report shows q2-q3 encode min timings improving by 1.11x-1.34x and
q9-q11 by 1.13x-1.77x on the Silesia 64 KiB and 128 KiB inputs, with
unchanged output sizes in those rows. - Optimized Brotli encoder prefix lookup paths for command lengths and
distances, plus context8 literal-tree reuse. - Added a decoder fast path for compressed meta-blocks with one literal tree
and one literal block type, avoiding per-literal block tracking. - Decode benchmark min timings for the 1 MiB Google-produced Silesia streams
ranged from 1.6% slower to 3.5% faster than v0.3.1, so no material decode
speedup is claimed for this release.
Tests and docs
- Added white-box coverage for command-prefix tables, distance-prefix mapping,
hash-chain boundary pre-checks, candidate gating, shared previous-match
tables, and lazy-match deferral. - Added roundtrip coverage for literal-heavy streams and lazy-match deferral
inputs across multiple Brotli qualities. - Regenerated the 0.5.0 Brotli release benchmark report and current benchmark
JSONL files.
v0.3.1
v0.3.0
v0.3.0
Added
- Added
just bench, backed bytools/brotli/bench/report.nu, to regenerate
the Brotli release benchmark report and current benchmark JSONL files. - Added checked-in Brotli benchmark data under
docs/current-bench/, including
Google Brotli 1 MiB comparison streams.
Performance
- Improved Brotli decode hot paths by sizing dynamic output buffers from the
compressed input length, refilling the bit reader four bytes at a time, and
skipping zero-width command extra-bit reads. - Packed decoded Brotli Huffman table entries into
FixedArray[Int]and
updated encoder/decoder users to avoid boxed table-entry loads. - Optimized compressed meta-block literal decoding with a single-literal-tree
fast path, a streamlined multi-tree path, and one reused command record per
meta-block.
Tests and docs
- Added white-box coverage for the decode optimizations, packed Huffman table
behavior, output capacity sizing, and command record reuse. - Regenerated
docs/brotli_release_report.mdfrom the current release-build
benchmarks forwasm-gcand native targets against Google Brotli CLI 1.2.0.
v0.2.0
v0.2.0
Breaking
- Renamed Brotli error APIs from
FzipError,FzipErrorCode,fzip_err, and
fzip_error_code_to_inttoFbrError,FbrErrorCode,fbr_err, and
fbr_error_code_to_int. - Renamed the stream callback wrapper from
FlateStreamHandlerto
FbrStreamHandler.
Changed
- Updated package metadata and README examples for version
0.2.0. - Updated Brotli verification tooling and generated API metadata to use the
hustcer/fbrpackage naming consistently.