Hello everyone, this post will be about data compression. So, why do we need compression? We most commonly need it when transporting data, to make its size smaller for faster/cheaper transfer process. Thats why downloading a steam game takes so much CPU resources, because the game files are being decompressed at download time. Now, how in the heck can we fit a piece of data in a smaller space than it fits in? This question might be hard to understand for people not very experienced in computers, because in real life, you can't just take 10 boxes, and fit them in size of 9(without modyfing them). Well, there is multiple ways to compress data, and the simpliest is propably repeating paterns. Compression using Repeating Paterns This method is very simple, lets say we have a piece of data thats a string, and has this data: "Hello, wor1d! Hello, world! Hello,". Now, we can make a simple program, which detects that the string contains 3x "Hello, " string. In this case, we can simply create a simple file format that will contain this data at the begining, and will use a different piece of data to reference it later. This piece of data(for now), can be a simple character 255 from the extended ascii table, so lets use that. So now, it will look like this: '255', "Hello, ", '255', "wor1d! ", '255', "world! ", '255' Now, the original size of the data was 33 bytes, and the new size is only 25bytes, meaning we saved 8bytes, and therefore compressed the data by 24%, which is actually preety solid for string this short. Now, repeating paterns compression method is not the only one and nor the best, but its definetly the simpliest by far. Anyway, that will be it for today, see y'all next time!