Compression Flashcards
2 Types of compression
- Lossy
- Lossless
Summary of how lossless compression works?
It allows the file size to be reduced without losing any of the original data. It works by searching for patterns and indexing those patterns.
Summary of how lossy compression works?
Lossy compression removed data that is not needed, either because a drop in quality is acceptable or the difference can’t be detected by the human eye.
Why is lossy compression not good for software, databases, etc.?
Because in lossy compression, parts of the original data are lost meaning the data can’t be put together how it was (bad for code, databases, etc.)
Run-length encoding.
It groups repetitive data and stores them once.
Dictionary encoding
Dictionary encoding algorithms create an index of data which require less space to store than the original data
3 benefits of compression
- Download speeds are increased
- Real-time streaming of audio and video without buffering
- Takes smaller size on disk, so you have more space to store other data