←back to thread

Faking a JPEG

(www.ty-penguin.org.uk)
341 points todsacerdoti | 1 comments | | HN request time: 0.234s | source
Show context
puttycat ◴[] No.44538667[source]
> compression tends to increase the entropy of a bit stream.

Does it? Encryption increases entropy, but not sure about compression.

replies(2): >>44538728 #>>44538745 #
JCBird1012 ◴[] No.44538728[source]
I can see what was meant with that statement. I do think compression increases Shannon entropy by virtue of it removing repeating patterns of data - Shannon entropy per byte of compressed data increases since it’s now more “random” - all the non-random patterns have been compressed out.

Total information entropy - no. The amount of information conveyed remains the same.

replies(1): >>44540229 #
1. gary_0 ◴[] No.44540229[source]
Technically with lossy compression, the amount of information conveyed will likely change. It could even increase the amount of information of the decompressed image, for instance if you compress a cartoon with simple lines and colors, a lossy algorithm might introduce artifacts that appear as noise.