How exactly do you compromise data?

244 views

So for example then I download a game in Steam, I download like 40Gb but it takes 60Gb of storage. Where do those 20Gb come from?

In: 1

3 Answers

Anonymous 0 Comments

You’re downloading a compressed file. It then has to decompress on your disk in order for the game to be useable

Anonymous 0 Comments

Ok, so the word you are after here is compress. Data can also be compromised, but context makes it clear that you do not mean this.

How exactly compression works varies depending which program is doing it, but as an example let’s look at Jpeg compression.

An image is made up of pixels, each pixel is identified by a triplet of values, RGB values, a blending of which can produce any colour.

In the state I describe above you have something like a PNG format, all of the information is preserved, every pixel is kept and still has 3 values.

However we want to make the file smaller, so we start scanning across the rows looking for two consecutive pixels with identical or very similar values. This is a block of the same colour. We might represent this in a file format by stating the RGB values and then saying “times 2”, or “between pixel 10 and 27”. We’ve now reduced the number of numbers we need to store to represent this image, and therefore it’s size in bytes.

Jpeg was an example of lossy compression. Information was irretrievably lost during this process, we no longer have the original values for some pixels and cannot restore them, we have only the approximation. This is part of what causes jpegs to be a bit pixelated, it’s averaged values.

Lossless compression that can truly recover original data does exist, it’s just a bit more complicated (I chose JPEG as the example here as I am familiar with it)

So in your example, those extra 20gb were created by your PC based on clues/instructions in the 40gb you actually got, it was compressed

Anonymous 0 Comments

I assume you mean compress data ?

There’s many ways to different way to compress data, most of them revolve around replacing raw data with information ABOUT that data, that will allow the computer to recreate it.

To take a very basic exemple, if you want to describe the US flag, you can either :

* describe every pixel one by one and line by line ( Blue/Blue/White/Blue….etc)
* describe it as [White background + 7 x red stripes + Blue square + 50 white stars]

The second option will take “less space” but in exchange the computer has to work more to recreate it, and understand what is a “stripe”, etc…