Algorithm that makes maximum compression of completly diffused data.

Chris Angelico rosuav at gmail.com
Thu Nov 7 23:06:49 EST 2013


On Fri, Nov 8, 2013 at 3:05 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> <michael.weylandt at gmail.com> wrote:
>
>
> On Nov 7, 2013, at 22:24, Chris Angelico <rosuav at gmail.com> wrote:
>
>> On Fri, Nov 8, 2013 at 1:43 PM, R. Michael Weylandt
>> <michael.weylandt at gmail.com> <michael.weylandt at gmail.com> wrote:
>>> Chris's point is more subtle: the typical computer will store the number 65536 in a single byte, but it will also store 4 and 8 in one byte.
>>
>> Well, 65536 won't fit in a single byte, nor even in two (only just). A
>> typical binary representation of 65536 would take 3 bytes, or 4 for a
>> common integer type: 0x00 0x01 0x00 0x00 (big-endian).
>
> Quite right -- meant C's int type, (machine word) not char. My mistake!

Sure. Assuming at least 32-bit words, yes, that's correct. Of course,
this is still just proving that it's {possible, not possible} to
compress specific values, while the OP claimed to compress anything.

ChrisA



More information about the Python-list mailing list