惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
Vercel News
Vercel News
D
Docker
博客园 - 聂微东
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
N
Netflix TechBlog - Medium
G
Google Developers Blog
腾讯CDC

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
Hellishly Slow Level 13 DEFLATE Compression
Kirill A. Korinsky · 2026-06-23 · via Hacker News

Abstract

DEFLATE level 13 is a deliberately impractical libdeflate compression level: the output remains standard DEFLATE, while the encoder spends far more time searching parse, Huffman, and block split choices. On Silesia it saves 86'990 bytes, 0.134%, over level 12 and runs 56.4x slower; this cost is acceptable only when data is compressed once and distributed many times.

Why DEFLATE

DEFLATE remains worth optimising because its decoders are already everywhere: HTTP content encoding, ZIP archives, PNG internals, software distribution, backup tools, and embedded formats still use the same LZ77 plus Huffman design. The decoder contract is fixed, but the encoder still chooses matches, block boundaries, and Huffman tables; better choices improve size without changing compatibility.

The baseline is libdeflate level 12, one of the strongest practical DEFLATE encoders. The level 13 implementation was contributed upstream as pull request.

Level 13 Mechanics

Level 13 keeps libdeflate’s near optimal parser, but makes its choices more expensive. It searches the full 32 KiB DEFLATE window, permits 15 optimisation passes, and applies static Huffman optimisation to blocks up to 50'000 input bytes. No format extension is involved.

For text like data, level 13 delays block size commitment. It samples up to 64 KiB from the current block start; if the sample contains no NULL byte and at most 97 distinct byte values, the soft block size rises from 300'000 to 1'000'000 bytes. The assumption is simple: a stable byte distribution lets one Huffman table cover more data.

The parser broadens the minimum cost search. It can choose the cheapest offset for each match length, estimate initial Huffman costs from literal and match length statistics, estimate offset slot frequencies from cached matches, and compare measured dynamic Huffman cost against static Huffman and literal only encodings.

Block splitting is also delayed. The compressor stores up to nine split candidates with parser state, then scores the full block and a bounded shortest path over candidate intervals. A single split can win on cost; a multi split path must beat the full block by at least 512 bits. The selected parse is cached for final flushing.

The slowness is bounded. Search passes, split candidates, and block sizes are capped, so level 13 cannot enter an unbounded optimisation loop like turtledeflate or broader file optimizers such as ECT.

Regression Policy

Development used a zero compression regression policy against the Silesia corpus: many approaches were tried, but only changes that strictly decreased at least one compressed file, without increasing any other compressed file, survived into the final level 13 configuration.

The Silesia corpus is small enough for repeated development, but mixed enough to punish single file tuning: it contains text, binaries, databases, images, and structured data.

Silesia Results

libdeflate level 12 versus level 13 on Silesia
filelevel 12 size / timelevel 13 size / timesize difftime diff
dickens3'688'552 / 1'289 ms3'684'671 / 83'512 ms-3'881 (-0.105%)+82'223 (+6378.8%)
mozilla18'267'490 / 4'959 ms18'235'120 / 110'754 ms-32'370 (-0.177%)+105'795 (+2133.4%)
mr3'448'571 / 1'627 ms3'443'723 / 16'260 ms-4'848 (-0.141%)+14'633 (+899.4%)
nci2'766'224 / 7'935 ms2'758'044 / 673'648 ms-8'180 (-0.296%)+665'713 (+8389.6%)
ooffice2'998'130 / 424 ms2'995'604 / 8'676 ms-2'526 (-0.084%)+8'252 (+1946.2%)
osdb3'642'347 / 798 ms3'641'341 / 4'942 ms-1'006 (-0.028%)+4'144 (+519.3%)
reymont1'702'796 / 1'005 ms1'699'494 / 81'839 ms-3'302 (-0.194%)+80'834 (+8043.2%)
samba5'135'662 / 2'889 ms5'122'812 / 141'227 ms-12'850 (-0.250%)+138'338 (+4788.4%)
sao5'255'575 / 333 ms5'255'358 / 1'687 ms-217 (-0.004%)+1'354 (+406.6%)
webster11'565'754 / 6'452 ms11'555'293 / 475'196 ms-10'461 (-0.090%)+468'744 (+7265.1%)
x-ray5'754'248 / 305 ms5'748'141 / 3'276 ms-6'107 (-0.106%)+2'971 (+974.1%)
xml633'760 / 1'104 ms632'518 / 69'504 ms-1'242 (-0.196%)+68'400 (+6195.7%)
total64'859'109 / 29'120 ms64'772'119 / 1'670'521 ms-86'990 (-0.134%)+1'641'401 (+5636.7%)

Level 13 saves 86'990 bytes across the corpus, a 0.134% reduction, and adds 1'641'401 ms of runtime. The strongest relative result is nci at 0.296%; sao changes by only 0.004%.