Compression of random binary data

Paul Moore p.f.moore at gmail.com
Tue Oct 24 07:27:03 EDT 2017


On 24 October 2017 at 12:04, Ben Bacarisse <ben.usenet at bsb.me.uk> wrote:
> Paul Moore <p.f.moore at gmail.com> writes:
>
>> On 24 October 2017 at 11:23, Ben Bacarisse <ben.usenet at bsb.me.uk> wrote:
>>> For example, run the complete works of Shakespeare through your program.
>>> The result is very much not random data, but that's the sort of data
>>> people want to compress.  If you can compress the output of your
>>> compressor you have made a good start.  Of course what you really want
>>> to be able to do is to compress the output that results from compressing
>>> your compressed out.  And, of course, you should not stop there.  Since
>>> you can compress *any* data (not just the boring random stuff) you can
>>> keep going -- compressing the compressed output again and again until
>>> you end up with a zero-length file.
>>
>> Oh, and just for fun, if you are able to guarantee compressing
>> arbitrary data, then
>
> It's a small point, but you are replying to a post of mine and saying
> "you".  That could make people think that /I/ am claiming to have a perfect
> compression algorithm.

Sorry. I intended the meaning "If one is able to..." but I was unclear. My bad.

>> 1. Take a document you want to compress.
>> 2. Compress it using your magic algorithm. The result is smaller.
>> 3. Compress the compressed data. The result is still smaller.
>> 4. Repeat until you hit 0 bytes.
>
> Isn't this just repeating what I said?  I must has not written is
> clearly enough.

More accurately, I didn't read it carefully enough. Again sorry.

However, I guess it serves as an example of a compression algorithm -
we can trivially compress the content of our two posts into a single
post with just as much information content, by deleting my post :-)

Paul



More information about the Python-list mailing list