4 ms·
I am surprised that an algorithm designed to compress a graphic image would be at all useful for compressing bytes of text.
by sethg 16y ago
I am surprised that an algorithm designed to compress a graphic image would be at all useful for compressing bytes of text.
- pan69 16y agobytes are bytes.
- whimsy 16y agoYou're being downvoted because, simply put, you're wrong. One gigabyte is as large as any other gigabyte, yes, but the characteristics of that gigabyte may be very different. If they're predictable in some manner, you can tailor a compression algorithm to that gigabyte. You can learn some about this by studying linear algebra.
- RodgerTheGreat 16y agoAnd information theory. The salient concept here is the "entropy" of a chunk of data. The maximum degree to which a given sequence of numbers (or symbols, bits, etc) can be losslessly compressed is called Kolmogorov complexity. Wiki away! :)
- whimsy 16y agoWow, super cool! I don't know much about entropy, etc. This is opening my eyes all over again. Thanks!
- wrs 16y agoFor a lossy algorithm based on human vision characteristics (e.g., JPEG) it would be quite surprising. However, PNG is lossless and is based on DEFLATE, a general-purpose compression algorithm. So actually this makes perfect sense. (See http://en.wikipedia.org/wiki/Portable_Network_Graphics#Compression http://en.wikipedia.org/wiki/Portable_Network_Graphics#Compr...)
- studer 16y agoPNG uses a predictor tuned to image data, though, so it's a bit tricker than that. But it's good enough for this purpose.