From 31ca3af830314705501bb808f85eac403b62b62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 7 Aug 2024 15:09:57 +0300 Subject: [PATCH] compress: headings --- content/log/2024/web-compression.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/content/log/2024/web-compression.md b/content/log/2024/web-compression.md index 07120d4..f8ffaf8 100644 --- a/content/log/2024/web-compression.md +++ b/content/log/2024/web-compression.md @@ -14,8 +14,7 @@ FUDing it. If I were the PR submitter, I would certainly not appreciate this comment. So I decided to conduct a non-scientific experiment: take a big piece of Javascript and compare brotli with zstd. -Executive Summary ------------------ +# Executive Summary * brotli compresses my chosen piece of Javascript better than zstd by 4-22%. * zstd is faster than brotli by 50-80% (depending on platform) and uses less @@ -44,8 +43,7 @@ Software: - brotli 1.1.0 from the distribution. - zstd v1.5.6 from the distribution. -Test Harness ------------- +# Test Harness I picked Youtube's `desktop_polymer.js`, because: @@ -87,12 +85,11 @@ esac Then symlink to it for each compression level: ``` -$ for l in 3 6 19 22; do ln -s wrap zstd-${l}; done +$ for l in 3 6 9 19 22; do ln -s wrap zstd-${l}; done $ ln -s wrap brotli ``` -Compression Ratio ------------------ +# Compression Ratio ``` Filename Bytes % larger that br @@ -114,8 +111,7 @@ itself somewhat of an advantage over other compressors for this corpus. Since `zstd -19` and `zstd -22` yield the same compression ratio, there is no point going ultra, I will exclude `zstd -22` from the tests. -Decompression Speed -------------------- +# Decompression Speed ``` hyperfine --export-markdown $(hostname) -w 1 -N ./zstd-{3,6,9,19} ./brotli @@ -145,8 +141,7 @@ hyperfine --export-markdown $(hostname) -w 1 -N ./zstd-{3,6,9,19} ./brotli Summary: `zstd -6` is fastest, brotli is slower by 50-80%. -Memory Usage ------------- +# Resource Usage ``` poop ./zstd-{6,3,9,19} ./brotli