Lecture 7 Data Compression File Structures
Previous Lecture
Field and record organization Sequential search and direct access Lecture 6 Fundamental File Structure Concepts Managing Files of Records Field and record organization Sequential search and direct access Seeking
Today Lecture
Overview In this lecture, we continue to focus on file organization, but with a different motivation. This time we look at ways to organize or re-organize files in order to improve performance.
Outline Data Compression: how to make files smaller
Data Compression An Overview Data Compression: Encoding the information in a file in such a way that it takes less space Question: Why do we want to make files smaller? Answer: To use less storage, i.e., saving costs To transmit these files faster, decreasing access time or using the same access time, but with a lower and cheaper bandwidth To process the file sequentially faster.
Using Compact Notation
Run-Length Encoding
Run-length Encoding Example
Variable-Length Codes
Huffman Code
Huffman Code Example
Huffman Tree
Irreversible Compression
Lempel-Ziv Codes
Lempel-Ziv Codes Example
Lempel-Ziv Codes Example
Lempel-Ziv Codes Example
Assignment "aaabbcbcdddeab" "I AM SAM, SAM I AM" Encode using Lempel-Ziv the file containing the following characters, drawing the corresponding digital tree "aaabbcbcdddeab" "I AM SAM, SAM I AM"
Next Lecture
Organizing Files for Performance Reclaiming space in files Sorting and Binary Searching
Questions?