What is it?
Give a block of anything, you’re asked how to organize or structure it so that it can take much as little space as possible.
Lossless vs Lossy
Lossless refers to perfect recreation. Lossy refers to near perfect recreation. So once we compress it in lossless, we MUST be able to recreate it after uncompressing it perfectly. Lossy just means close enough to perfect.
Approaches (Lossless)
-
Substitution: Given “aaaabbbababaac” we can swap “ab” and “c” and vice versa. Compressing it we get “aaacbbccaaab”. This saves 2 spaces here but you can continue this train of thought.
-
Entropy Encoding
-
Context Modeling
Approaches (Lossy)
- Transform Coding
- Differential /Inter-frame (temporal)