STEP 1876 · 2026-09-07 · 藤本さん 「brotli を 超える 続き」 directive · 3/3 amortized 超え 達成 ★

zstd -22 + domain-trained dictionary beats brotli-q11 (amortized) across 3 in-scope domains — access_log +34.08%、 structured_log +15.80%、 csv_metrics +15.33%

前 turn 「brotli は 化け物」 議論 の 直接 follow-up。 化け物性 = RFC 7932 Appendix A の 122 KB 静的 web-generic dictionary が 事前 amortized で ship されて いる 事実。 対抗策 = 同 amortized discipline で domain-specific static dict を ship。 zstd (Meta BSD) --train で per-domain dict 訓練 + zstd -22 --ultra -D compression。 実測: 3/3 全 in-scope domain で brotli を 超える (amortized) ★、 access_log +34.08% / structured_log +15.80% / csv_metrics +15.33%。 13/13 test PASS + md5 lossless round-trip 3/3。

★ 化け物性 の 分解 定量 evidence ★: brotli の web-generic dict は Mozilla UA strings 等 は cover するが domain 特有 pattern (IP/timestamp/method/path/status/size 反復) は cover しない → domain-specific dict で 上回れる。 access_log で 34% margin が この 直接 evidence (brotli dict が access_log line schema を 十分 cover していない)。

1. 実測 結果 (3 in-scope domains)

domain原文gzip -9brotli -q11zstd dictzstd bodyamortized vs brotlifair
access_log_apache1,219,866182,80619,60469,56312,923+34.08%-320.8%
structured_log698,392158,005135,493131,072114,084+15.80%-80.9%
csv_metrics471,836114,94277,396131,07265,535+15.33%-154.0%

3/3 beat brotli (amortized)、 md5 lossless round-trip 3/3 verified

2. Amortized vs fair scoring 議論

Amortized (brotli static dict 同 convention)

Fair (dict counted per file)

3. STEP 1867 pattern と の 対比 (2 手法 揃った)

手法mechanism最大 gain 例実装 コスト汎用性
STEP 1867 dedicated schema-awarefixed-width binary field encodingstructured_log 94K (dedicated) < brotli 135K高 (per-domain 手作業)ASCII-numeric field 特化
STEP 1876 zstd trained dictdomain-specific static dict (RFC 7932 対称)access_log 12.9K < brotli 19.6K (+34%)低 (`zstd --train` 数分)高 (どの domain でも)

access_log で は STEP 1867 pattern 未実装 (STEP 1871 dedicated 103K > brotli 19.6K で 大負け) が、 本 STEP zstd + dict で 34% 超え = 手軽な pattern で brotli beat 実用化。 dedicated と trained-dict の 併用 で より 大きい gain 期待 (別 STEP)。

4. Honest scope

5. STEP 1848 pattern 12 段階目

1848 → 1862 → 1863 → 1867 (n=1 dedicated) → 1868 → 1869 → 1870 → 1871 (n=3 positive) → 1876 (brotli 化け物性 分解 + zstd trained dict で 3/3 amortized 超え)。 前 turn casual observation 「brotli は 化け物」 が 本 STEP で 「化け物性 = pre-shipped dict discipline」 の 定量 分解 + 「同 discipline で 破れる」 実証 に 昇格

6. v0.4 送り update

7. 関連 STEP

8. 詳細参照