Re: The software I wish I had



Keith Thompson wrote:
CBFalconer <cbfalconer@xxxxxxxxx> writes:
Richard Heathfield wrote:

Tut tut. It's trivial to implement software that can compress any
file down to a single byte:

Step 1: ascertain the number of bits, B, in the file.
Step 2: define "byte" as being B bits wide.
The compression is dead easy. Decompression is another matter.

Given Richard's algorithm, decompression is trivial; just restore the
definition of "byte" to its previous value. (It's not clear even
that's necessary.)

Aha, but if you have to restore the definition of the word "byte" to
its previous value, then you need some sort of stack on which to store
definitions of words, which makes the compression ratio a bit worse.

On the other hand, the ability to compress files to the logarithm of
their original size is still a useful ability...

- Logan
.