I was surprised to learn that gzip streams encode which operating system did the compression. I built a little tool, "gzpeek", to inspect this metadata (and more): https://evanhahn.com/introducing-gzpeek/
Context Mode – 315 KB of MCP output becomes 5.4 KB in Claude Code
https://github.com/mksglu/claude-context-mode
#HackerNews #ContextMode #ClaudeCode #MCPoutput #Compression
Came across this interesting, readable, thorough article on current developments in dictionary #compression for web content.
Enticing pullquote: "…YouTube JS download size for returning desktop users [shrinks] up to 90% compared to existing best-practice compression."
Also, thank you: "Please please don't treat this as a license to deliver even bigger piles of #Javascript."
Jump to the "Putting compression dictionaries into practice" section if you're short on time.
https://httptoolkit.com/blog/dictionary-compression-performance-zstd-brotli/
Came across this interesting, readable, thorough article on current developments in dictionary #compression for web content.
Enticing pullquote: "…YouTube JS download size for returning desktop users [shrinks] up to 90% compared to existing best-practice compression."
Also, thank you: "Please please don't treat this as a license to deliver even bigger piles of #Javascript."
Jump to the "Putting compression dictionaries into practice" section if you're short on time.
https://httptoolkit.com/blog/dictionary-compression-performance-zstd-brotli/
Using the Browser’s <canvas> for Data Compression
When building static websites and Single-Page Applications (SPAs), we sometimes need functionality in JavaScript front ends—such as compression—that is usually handled on the back end instead. […]
🔄 https://jstrieb.github.io/posts/canvas-compress/
#browser #webdev #compression #data #javascript #js #datacompression #web #webfrontend #frontend #staticsite #html #canvas #singlepage #singlepageapps
The lossless data compression fairies are having fun with me today...
- Scan 8.5" x 11" document at 1200dpi @ greyscale
- -> 60 MiB PNG, thank you
- Open PNG in GIMP, select a good threshold point, convert to 1bpp
- -> 514 KiB PNG
- Wait... 116:1 compression from 8-bit PNG to 1-bit PNG? HOW??
- convert to pdf
- "Warning, this file is really huge and may actually be a decompression bomb" lol, ok.
- -> 515 KiB PDF, nice
ocrmypdf foo.pdf document.pdf- -> 194 KiB PDF
- WHAT? HOW?!?
pdfimages -png document.pdf foo- -> 514 KiB PNG
- WHAT IS HAPPENING?!?
The lossless data compression fairies are having fun with me today...
- Scan 8.5" x 11" document at 1200dpi @ greyscale
- -> 60 MiB PNG, thank you
- Open PNG in GIMP, select a good threshold point, convert to 1bpp
- -> 514 KiB PNG
- Wait... 116:1 compression from 8-bit PNG to 1-bit PNG? HOW??
- convert to pdf
- "Warning, this file is really huge and may actually be a decompression bomb" lol, ok.
- -> 515 KiB PDF, nice
ocrmypdf foo.pdf document.pdf- -> 194 KiB PDF
- WHAT? HOW?!?
pdfimages -png document.pdf foo- -> 514 KiB PNG
- WHAT IS HAPPENING?!?
Many people seem weirdly suspicious about Google's #Brotli compression while being weirdly chill about Facebook's #ZSTD, to the point of commenting on posts about Brotli compression being added to things to the effect of, "This is a conspiracy by Google, they clearly should've chosen ZSTD instead". What's up with that? Is Google really so much less scary than 𝘍𝘢𝘤𝘦𝘣𝘰𝘰𝘬?
(This is a subtweet about a certain HN post about Brotli compression coming to #PDF)
My notes from January 2026: started a new job at Ghost, published a WebAssembly module, set every Vim configuration option, and applauded general strikes. https://evanhahn.com/notes-from-january-2026/
🎞🗜 #compression #vidéo #AV1 #ffmpeg
Comme promis : voici mes paramètres pour ré-encoder mes vidéos en AV1 (petite évolution par rapport à mon pouet précédent) avec l'explication de tous les paramètres.
https://sebsauvage.net/wiki/doku.php?id=ffmpeg#re-encodage_en_av1
J'ai aussi mis des exemples concrets de compression, avec taille résultante et durée d'encodage, histoire de se faire une idée.
Si vous voyez des erreurs, si vous aves des suggestions, je suis à l'écoute !
Many people seem weirdly suspicious about Google's #Brotli compression while being weirdly chill about Facebook's #ZSTD, to the point of commenting on posts about Brotli compression being added to things to the effect of, "This is a conspiracy by Google, they clearly should've chosen ZSTD instead". What's up with that? Is Google really so much less scary than 𝘍𝘢𝘤𝘦𝘣𝘰𝘰𝘬?
(This is a subtweet about a certain HN post about Brotli compression coming to #PDF)
ISO PDF spec is getting Brotli – ~20 % smaller documents with no quality loss
https://pdfa.org/want-to-make-your-pdfs-20-smaller-for-free/
#HackerNews #ISO #PDF #Brotli #Compression #PDF #Optimization #Document #Size #Reduction #Quality #Preservation
Post-transformer inference: 224× compression of Llama-70B with improved accuracy
https://zenodo.org/records/17873275
#HackerNews #PostTransformer #Inference #Llama70B #Compression #ImprovedAccuracy
So I was working on this:
enz / unz
ZIP-compatible compressor and decompressor pair that beat zip -9 on source code by 5-10%. Uses smarter pre-processing before DEFLATE.
It's often better than the alternatives for text, source code, structured text files, and markup.
Pure Go. No dependencies beyond stdlib. Output works with standard ZIP tools where possible
Benchmarks available.
So I was working on this:
enz / unz
ZIP-compatible compressor and decompressor pair that beat zip -9 on source code by 5-10%. Uses smarter pre-processing before DEFLATE.
It's often better than the alternatives for text, source code, structured text files, and markup.
Pure Go. No dependencies beyond stdlib. Output works with standard ZIP tools where possible
Benchmarks available.
@OpenComputeDesign
Remember when we were talking about #audio #lossy #compression earlier?
This is NUUUUUTS:
🗜️ #compression
C'est trop cool : Tapez du texte et il vous affiche la version compressée (gzip).
https://lynn.github.io/flateview/
The bzip2 crate switches from C to 100% Rust, https://trifectatech.org/blog/bzip2-crate-switches-from-c-to-rust/.
Use less memory. Faster to run. Simpler cross-compilation. That’s it.
The crate has been audited too, neat!
🗜️ #compression #7zip
Pour illustrer les paramètres "compression maximale" dont j'ai parlé là : https://sebsauvage.net/links/?s0zmfA
Illustration avec un jeu : Loophole.
Décompressé: 3,18 Go
7z "ultra" (-mx=9) : 1,33 Go
7z avec mes réglages : 0,53 Go
(Et zpaq -m4 fait un peu mieux : 0,49 Go)
Bien sûr c'est un exemple qui marche bien, le gain ne sera pas forcément aussi bon sur d'autres données.