Lesson 1: Compression
Why is compression required?
Look at the image below, what do you notice about it?
Look at the image below, what do you notice about it?
Compression is defined as
A compressed file is any file that contains one or more files or directory that is smaller than their original file size. These files make downloading faster easier and allow more data to be stored on a removable media. Common compressed file extensions are .ZIP, .RAR, .ARJ, .TAR.GZ, and .TGZ. Sound can also be compressed Complete some of the compression activities below:
|
In this next example we can take the 'Numbers' from the image and place them into a long list, this is a set of instructions for re creating the picture and takes up a lot less space in memory.
![]()
|
![]()
|
Run length coding:
Replacing each pixel as a number in a list means that you can total all values and create a look up table where each colour and number of pixels is stored. This saves a lot of memory. The program then Runs the through the length of the list and loads each pixel and colour.
Replacing each pixel as a number in a list means that you can total all values and create a look up table where each colour and number of pixels is stored. This saves a lot of memory. The program then Runs the through the length of the list and loads each pixel and colour.

Run length code example | |
File Size: | 169 kb |
File Type: |
What have you learnt today?

Compression Competition | |
File Size: | 212 kb |
File Type: |