digital data compression Flashcards
1
Q
what is text?
A
encoded using ASCII or Unicode to assign binary codes to characters
2
Q
what is images?
A
encoded by assigning codes to the colour of each pixel
3
Q
what is sound?
A
encoded by sampling analogue waves and assigning binary values to each sample
4
Q
what are some types of compression
A
Lossless – file size reduced with no data lost
◎ Size reduction is limited
◎ File can be fully recovered on decompression Lossy – file size reduced with some data loss
◎ More reduction of file size
◎ Recovered file may be of reduced quality
5
Q
what is huffman coding
A
- The number of times data occurs is checked
- The data is sorted in a binary tree so that:
- The data with the highest frequency has the
shorter codes – top of the tree - The data with the lowest frequency has longer
codes – bottom of the tree
6
Q
what is a huffman tree?
A
- Binary tree: root at the top, grows downwards
- Every point is a node, every line is a branch
- Every node can have a maximum of two branches