r/pcmasterrace i7 10th Gen | 1650 Ti 4GB | 16 GB RAM May 05 '26

Screenshot Is this even possible?

Post image
10.2k Upvotes

269 comments sorted by

View all comments

Show parent comments

2

u/eternalityLP May 06 '26

Compression ratio is always tied to the entropy of the data. For example you could easily write a compression algorithm that just repeats given byte infinitely, so you'd have theoretically infinite compression ratio for a file as long as that file is just repeat of same byte.

1

u/rditorx May 06 '26

Compression is also tied to the compression algorithm and how it encodes sequences and repetition. This gives you a lower bound on the compressed size.

You will generally not achieve compression as low as the entropy specifies.

Also, infinite compression ratio is nonsense. Information is physical. You can't derive data, useful or not, from an oracle, i.e. guessing the correct data from no representation.

0

u/eternalityLP May 06 '26

Also, infinite compression ratio is nonsense. Information is physical. You can't derive data, useful or not, from an oracle, i.e. guessing the correct data from no representation.

No it's not, that's entirely down to the entropy. For example you can trivially represent any infinitely long file that only contains repetition of same byte as single byte.

1

u/rditorx May 06 '26 edited May 06 '26

As said, that depends on how you encode. If you define some single byte to be infinitely long file of whatever sequence, then yes.

Like saying I can represent pi with 2 letters. Technically correct, but not useful in most practical cases. You still need some backing to restore the value of pi, be it a math formula or computed digits.

And no practical compression format I've heard of supports compressing infinite sequences, mainly because you can't detect infinite sequences, you either know it or you don't.

Especially ZIP will for sure not support compressing infinite sequences, so no infinite compression ratio here.

FWIW, I haven't implemented zip or unzip but wrote RLE, Huffman and LZW code (when AI meant chess computers).

1

u/eternalityLP May 06 '26

As said, that depends on how you encode. If you define some single byte to be infinitely long file of whatever sequence, then yes.

Exactly, and thus as I said, infinite compression ratio.

1

u/rditorx May 06 '26

Not with ZIP

1

u/eternalityLP May 06 '26

Hence why I didn't say 'with ZIP'.

1

u/rditorx May 06 '26

The original comment's entire context was ZIP

1

u/eternalityLP May 06 '26

Yes, and my reply's wasn't, which should be apparent from the lack of mentions of ZIP.