5 ms·
Another implementation of paradoxical compression, which, applied recursively also allows for infinite compression (ie. down to 0 byte) of any file: https://cs
by Arkanosis 5y ago
Another implementation of paradoxical compression, which, applied recursively also allows for infinite compression (ie. down to 0 byte) of any file:
https://cs.fit.edu/~mmahoney/compression/barf.html https://cs.fit.edu/~mmahoney/compression/barf.html
Of course, there's a catch.
- messe 5y agoGiven that barf is already using the filename to indicate the compression, why not just move the final byte of the file into the filename instead? Something like, head -c -1 "$file" > "$file$(tail -c1 "$file")" EDIT: Obviously this has the corner case of null bytes
- chrisseaton 5y agoIs he just moving bytes from the file into the file name? He should count the increased size of the file name in the size of the compressed file otherwise he’s not counting all of the essential data you need for the decompression. You can decompress a gzip file without the file name (think about tar using a pipe.)
- karmanyaahm 5y agoI'm pretty sure barf is a joke?
- chrisseaton 5y agoHow do you tell the difference between a joke and a compression crank?
- Arkanosis 5y agoIn this very specific case because the author, Matt Mahoney, is one of the most respected experts in the field of lossless data compression. But yeah, in some case the difference is hard to tell.
- rawling 5y agoReminds me of this: https://www.patrickcraig.co.uk/other/compression.php https://www.patrickcraig.co.uk/other/compression.php