Compression Flashcards
What is compression
Compression remains reducing the amount of storage space in bits that a given file takes up
Why do we need compression
1) To reduce storage requirements
2) To reduce download times
3) Make best use of bandwidth,over a network
What is the compression ratio
Compressed file size
——————————-
Original file size
What is lossy compression
The term lossy means that there will be an acceptable loss in data being compressed. Leading to uncompressed losing quality
How does lossy compression work
• The compression algorithm removes data permanently from the original file making it smaller in size (bits)
• The decompression algorithm recreates the lost data, based on the data that remains
When do you use lossy compression
1) Audio files
2) Video files
3) Images
What is lossless compression
Lossless indicates no loss of data when being compressed leading to the uncompressed version being identical to the original version
How does lossless compression work
Rewrites the code structure making it more efficient and therefore smaller in size. An index is generated containing the original details
Decompression algorithm recreates the original data using the index generated before
What are the 2 main examples of lossless compression
1) Run Length Encoding
2) Dictionary based methods
What is Run Length Encoding
Replacing repeating data with the number of times it’s repeated next to the thing it’s repeating E.G
CCFFGHKJHHFFFFFF
To
2C2FGHKJ2H6F
What is dictionary based coding
Using a dictionary it stores values to set of data and since it’s stored any repeating values aren’t added onto the end which saves storage
4 bit code | Entry
0000. | Hi
0001. | How