Skip to content

Releases

v0.8.2

Choose a tag to compare

@hustcer hustcer released this 10 Aug 10:42

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

Choose a tag to compare

@hustcer hustcer released this 09 Aug 06:32

v0.8.1

Changed

  • Migrated the module manifest from moon.mod.json to moon.mod and 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

Choose a tag to compare

@hustcer hustcer released this 14 Jun 00:14

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

Choose a tag to compare

@hustcer hustcer released this 12 Jun 03:31

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-compare validation passed across the checked wasm-gc and native
    rows, with an aggregate decode improvement of about 1.1% in that run.

Compatibility

  • Updated internal checked-error handling and tests for moonc v0.10.0
    warnings without changing the public API.

Tools and docs

  • Removed the native benchmark cc-o0 compiler 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 one moon run
    process startup across repeats.
  • Regenerated docs/brotli_release_report.md and the checked-in current
    benchmark JSONL files with the updated harness.

v0.7.0

Choose a tag to compare

@hustcer hustcer released this 04 Jun 08:33

v0.7.0

Changed

  • UnbrotliStream now decodes incrementally: it emits output through ondata
    as complete Brotli meta-blocks become available (intermediate calls report
    is_final=false), instead of buffering all input and emitting once on the
    final push. Consumers that assumed a single ondata call with the whole
    result must now concatenate the emitted chunks.
  • UnbrotliStream now ignores UnbrotliOptions.out; streaming output is
    delivered only through ondata. One-shot unbrotli_sync still honors out.
  • UnbrotliStream::push now rejects non-empty input pushed after the stream has
    finished.

Added

  • BrotliDistanceRing::clone in the common package, used by the streaming
    decoder to speculatively decode a meta-block and roll back on short input.

Tests

  • Added UnbrotliStream coverage: output equivalence against one-shot
    unbrotli_sync across every input split point, byte-at-a-time decoding,
    max_input_size enforcement, post-finish rejection, the empty-input final
    marker, and truncated-input errors.
  • Added white-box coverage for common, decode, and encode helpers.

Tools and docs

  • Documented the UnbrotliStream streaming trade-offs in the README: output is
    retained for the stream lifetime (memory is not window-bounded), each push
    may re-decode the in-progress meta-block, and out is ignored.
  • Reworked the coverage-analysis script (tools/analyze-coverage.nu) and
    COVERAGE_ANALYSIS.md.

v0.6.0

Choose a tag to compare

@hustcer hustcer released this 01 Jun 09:26

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 bench report, 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 direct tools/ subdirectories
    and updated just recipes 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 size as a filesize value and
    to select native .exe artifacts explicitly.
  • Documented recent js, wasm-gc, and native size-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

Choose a tag to compare

@hustcer hustcer released this 31 May 08:33

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 5591fe6 target-perf report, q4-q8 encode min timings improved
    from v0.3.1 by 2.15x-3.01x on wasm-gc and 3.08x-3.95x on native for the
    Silesia 64 KiB input, and by 2.57x-3.25x on wasm-gc and 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

Choose a tag to compare

@hustcer hustcer released this 31 May 02:49

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@hustcer hustcer released this 31 May 02:43

v0.3.0

Added

  • Added just bench, backed by tools/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.md from the current release-build
    benchmarks for wasm-gc and native targets against Google Brotli CLI 1.2.0.

v0.2.0

Choose a tag to compare

@hustcer hustcer released this 30 May 13:27

v0.2.0

Breaking

  • Renamed Brotli error APIs from FzipError, FzipErrorCode, fzip_err, and
    fzip_error_code_to_int to FbrError, FbrErrorCode, fbr_err, and
    fbr_error_code_to_int.
  • Renamed the stream callback wrapper from FlateStreamHandler to
    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/fbr package naming consistently.