News for hackers. Stuff that matters.
Re:Taking a Look at Compression Algorithms by retrac on Thursday January 23, 2025 @10:56AM (#42805165)
What you are describing is sometimes called a shared dictionary and it's a great trick for task-specific compression, where you know what data you're going to be compressing ahead of time.

The Brotli algorithm is typical LZ plus a shared dictionary aimed at common web documents and markup. It does work well and fast for HTML. A common criticism is that it's basically targeted at compressing Wikipedia and the dictionary is loaded with a bunch of junk and now every browser needs a copy of that 120 kB of junk some of which will very rarely be used unless you're compressing Wikipedia. (Both "II, Holy Roman" and "Holy Roman Emperor" are tokens in the Brotli dictionary, for example. Whole thing here: https://gist.github.com/duskwuff/8a75e1b5e5a06d768336c8c7c37... )

Re:Taking a Look at Compression Algorithms by svieira on Thursday January 23, 2025 @11:30AM (#42805440)
In fact there is a new feature Chrome is championing (and just shipped) called "Compression dictionary transport" - https://datatracker.ietf.org/doc/draft-ietf-httpbis-compress... / https://chromestatus.com/feature/5124977788977152 that allows any HTTP resource to specify the dictionary it wants to use (including the "use me as the dictionary for future reuqests") which allows a website to use a dictionary that specialized to _its_ contents instead of the contents of something completely different.
Re:Taking a Look at Compression Algorithms by genewitch on Thursday January 23, 2025 @02:36PM (#42807255)
Another state machine in the browser what can go wrong
Re:Taking a Look at Compression Algorithms by pixl97 on Thursday January 23, 2025 @05:44PM (#42808843)
Heh and if dictionaries can be shared between sites, another potential security leak.