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
Of course, there's a catch.
https://cs.fit.edu/~mmahoney/compression/barf.html
Of course, there's a catch.
head -c -1 "$file" > "$file$(tail -c1 "$file")"
EDIT: Obviously this has the corner case of null bytesYou can decompress a gzip file without the file name (think about tar using a pipe.)