The Hitchhiker's Guide to Compression
go-compression.github.io
go-compression.github.io
But the author seems to lament that not much of interest is happening in lossless compression. That's true, but there's a good reason for it: Lossless compression is just about as good as it's ever going to get, and it's easy to prove that. Seeking dramatic improvements in general lossless compression is like seeking faster-than-light travel: Ain't gonna happen. Except for specialized niches, any improvements to lossless compression are going to be tiny and incremental. Tiny and incremental might well matter for petabyte data stores like Google manages, but it won't matter for most people.
Lossy compression is a different story. There's still lots of unexplored territory in finding an optimum bit rate that matches the information processing capabilities of human eyes and ears.
I think the greatest breakthrough in lossless compression would come when the development of compute outpaces storage density. Maximum possible compression (entropy i think?) isn’t impossible per say, but it is computationally impossible with today’s computing resources.
Of course, largely hypothetical now, but I envision a time in the distant future where we produce so much data that we must compress it to its principled minimum.
I do agree that current lossless compression is pretty pressed for further innovation given current resource constraints.
Seems impossible considering in my lifetime I’ve basically seen ISP speeds go from 5/1 on my first cable connection to 20/768 20 years later on DSL. I always find it a bit weird knowing how important the internet is to commerce and the economy and my only real way to access it is through the same phone line that has been around forever.
More background: https://marknelson.us/posts/2006/06/20/million-digit-challen...
Compressing well-compressed or random data would be impossible but how is it indicates there's little room?
Still, I am reminded of the Huffman compression: there researchers already thought they reached the optimum. They were proven fenomemally wrong when the researchers relized they should look at compressing sequences rather than individual bytes (I believe it was LZ77 or LZW algorithm that was the first).
If we take that into account and following the same thought, improvements may still be possible if we could compress based on a larger body of data. For example, headers of the same file type contain the same common information. In theory, these could only be stored once on the hard drive. This is something deduplicated storage is already trying to achieve, so nothing new here, just trying to point to one avenue that can still yield future improvements :)
Also going one byte at a time with minimal context is pretty good for text but pretty bad for many other kinds of data. There's a lot of room to improve on those fronts.
I'm very far from an expert, I found that when searching a couple of years ago for something simple and usable in a semi-tight embedded setting.
When managing software installation/upgrade for an embedded solution, LZJB typically shaved 30-50% off the size of the executable which was really awesome. LZJB requires a quite small amount of RAM when decompressing (around 1 KB if I remember correctly).
I have a repo with a BSD-licensed implementation in pure Python, which is very useful for putting in the build pipeline [2].
Similarly, the difference between LZ77, LZSS, etc. aren't really of note. The modern innovations in LZ77 are 1. getting the really optimal parse from your encoder (hard!), 2. things to recognize higher order structure, like repcodes (first seen in LZX, but also a big part of LZMA), 3. allowing the CPU to parallelize the decode procedure by making the stream less serial.
I'm aware of one tool for zip:
https://pypi.org/project/deterministic-zip/
of course that only helps if it's used to create the original zip.
Is there a list of "reversible" formats somewhere? Are there other ways to deal with this?
I've been doing an awful find, xargs, and touch combo to get deterministic zips, but the cli args vary between unix distributions.
It would be better if zip and tar could just take a single timestamp arg, and use that for all entries.
[1] https://quixdb.github.io/squash-benchmark/#optimal-codecs