Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compression.

Similar presentations


Presentation on theme: "Compression."— Presentation transcript:

1 Compression

2 Data Compression If we need to send messages, videos, pictures across the network we want to do this as quickly as possible. Two crucial components about networks is time and money!

3 Data Compression Compression: Storing data in a format that requires less space than usual.

4 There are numerous types of programs that compress files and folders on the internet such as:
Winzip Stuffit ZipitFree

5 Compression Data is individual bits
Not all the bits contain information – some are ‘fillers’ i.e. number 4 in 1 byte binary is however there are preceeding 0’s that are now taking up “wasted space”

6 Compression Files contain a lot of redundant data, quite often it is data that is repeated over and over. "Ask not what your country can do for you -- ask what you can do for your country."

7 Compression The quote has 17 words, made up of 61 letters, 16 spaces, one dash and one period. If each letter, space or punctuation mark takes up one unit of memory, we get a total file size of 79 units. To get the file size down, we need to look for redundancies.

8 Compression Immediately, we notice that: "ask" appears two times
"what" appears two times "your" appears two times "country" appears two times "can" appears two times "do" appears two times "for" appears two times "you" appears two times

9 Compression Approximately half of the phrase is redundant. Nine words -- ask, not, what, your, country, can, do, for, you -- give us almost everything we need for the entire quote. To construct the second half of the phrase, we just point to the words in the first half and fill in the spaces and punctuation.

10 Compression Data compression is particularly useful in communications because it enables devices to transmit or store the same amount of data in fewer bits. There are a variety of data compression techniques, but only a few have been standardized.

11 Compression LZ adaptive dictionary-based algorithm 1. ask 2. what
3. your 4. country 5. can 6. do 7. for 8. you

12 Compression Each word then gets allocated to a numbered index:
The new sentence reads: “1 not – ” We have just shortened the sentence to half of its size

13 Compression To be even more compressed the program may look for repeated letter combinations or even phrase combinations ie “your country” is repeated twice and so on…..

14 Compression Lossy & Lossless Compression
The type of compression we have just looked at is Lossless compression as the file once recreated from the compression file is exactly what it was before compression. No data has been lost in the process.

15 Compression Lossy & Lossless Compression
Lossy compression works differently – here programs eliminate unnecessary bits of information such as found in bitmap files

16 Compression In a picture with varying shades of green ie a forest, then one green pixel is given a number and then the same number is repeated for all the green pixels. Often you are not aware of the change if the compression scheme works well however the file size is significantly reduced.

17 Compression

18 Compression The previous picture was compressed using lossy compression in Adobe Note the reduction in file size without significant loss of detail

19 Compression Activity Find 2 different pictures of full resolution on the internet. Write down their properties i.e. size and number of pixels Using different compression software, compress the images and then view them again, noting any differences


Download ppt "Compression."

Similar presentations


Ads by Google