jak0b345 t1_j1yl1bo wrote
it depends. there are two types of compression.
lossless compression has to goal to restore each and every bit exactly, this is needed for things like e.g. program code, word documents or just generally any file which you don't know what the content represents. this type of compression works by finding patterns of bits which are present many times in the file (like e.g. a string of 8 zeros) and assingning them a shorter pattern (e.g. only two zeros).
the other type of compression is lossy compression and is used e.g. for images, video and sound files (like .jpg or .mp3). this works by only keeping the information that is perceptible to humans. in a image that could mean e.g. smoothing edges to be less sharp but only to a degree thats barely noticeably to the human eye. this is also where the wierd effect next to black and white text of memes which have been repostet a lot comes from. see e.g this website
generally lossy comoression is much more powerful than lossless compression, since it does not need to be able to reproduce each bit exactly. it only needs to provide a result which is quite close to the original considering the limits of human perception
Viewing a single comment thread. View all comments