Imagine you have a handful of soaking wet paper towels. You squeeze the handful with considerable force into a small ball of paper towel, with water leaving the towel as you did this. This is an odd, yet good example I believe, that explains compression. As students of computer science and having turned in four programming assignments that include multiple .java files, we are very familiar with .zip files. If you are unaware of what a .zip file is, it is simply a file that compresses other files into one compact file. Data compression works by reducing the amount of data needed for the storage or transmission of a given piece of information. It is is a critical aspect of our computing devices as it allows us to transmit large quantities of data over communication networks. This technique to compact data is very similar to Morse code which assigned the shortest codes to the most common characters.
Data compression is usually categorized into two subsets: lossless and lossy. Lossless data is exact and can be reversed to yield the original data. Lossy, on the other hand, is inexact and can lose detail or yield errors when data is reversed back from compression.The wet paper towel example would be considered lossy since you squeezed water from the towels as you compressed them and if you were to detangle the paper towel ball you would have much less water in it, which is like losing data. The .zip files we use for our assignments are lossless which is great because it means that our assignments will never have any problems when they are turned in! In addition, a great thing about data compression is that it can usually compress images by factors of 10 to 20+. This means that we get to store more pictures of our cats and dogs and family members on our computer to post on Facebook!
Data compression is a very important part of our computing systems and, although it is not as simple as squeezing wet paper towels, it is still a good thing to know about especially as computer science students.
References:
https://www.britannica.com/technology/data-compression#ref886796
https://medium.com/@_marcos_otero/the-real-10-algorithms-that-dominate-our-world-e95fa9f16c04#.azqyazfwh
Photo Reference:
http://www.gitta.info/DataCompress/en/html/CompIntro_learningObject2.html

Hey Mariah,
ReplyDeleteGreat post, this offers a really clear explanation on something that's very abstract. My only question is what factors go into whether a compressed file is lossless or lossy? Is it the size of the original data?
Mike
Hi Mariah,
ReplyDeleteI really liked how you started of with a very casual example for your article. It made it easier for me to understand the article.
Hi Mariah,
ReplyDeleteI was curious if lossless and lossy compressed files had different specific use, so I looked it up, and lossless files are usually used for sound and video, where a little loss of information would not be noticeable. It''s a great journal, thanks!