Data Compression - AP Computer Science Principles
- Which compression type typically results in smaller file sizes?
- Lossy compression. Removing data allows for greater size reduction.
- What is the primary trade-off in lossy compression?
- File size versus quality. Core decision in choosing compression settings.
- What is data compression?
- Data compression reduces file size by encoding information more efficiently. Essential technique for managing storage and bandwidth efficiently.
- What does 'decompression' mean?
- Restoring compressed data to its original form. Process of expanding compressed data back to original.
- Identify a use case for lossy compression.
- Streaming audio or video where quality loss is acceptable. Real-time applications can tolerate some quality loss.
- In which scenario is lossless compression favored?
- When data integrity is critical, such as text files. Perfect reconstruction is essential for text documents.
- What is entropy in the context of data compression?
- Measure of randomness or disorder in data. Higher entropy means less predictable, harder to compress data.
- Identify a file format that uses lossy compression.
- JPEG. Common image format that sacrifices quality for size.
- Identify a benefit of smaller file sizes.
- Faster data transmission. Reduced file sizes improve network transfer speeds.
- Which compression is reversible, lossy or lossless?
- Lossless compression. Only lossless compression preserves all original data.
- Which type of compression is used in ZIP files?
- Lossless compression. File archives require perfect data preservation.
- Which type of compression is used in MP3 audio files?
- Lossy compression. Audio quality reduction is acceptable for smaller files.
- What is the primary goal of data compression?
- To reduce the size of data files. Fundamental objective of all compression algorithms.
- What is Huffman coding?
- A lossless data compression algorithm using variable-length codes. Assigns shorter codes to more frequent characters.
- What is the impact of compression on image quality?
- Potential loss of detail in lossy compression. Lossy algorithms remove visual details to reduce size.
- What does the term 'compression ratio' refer to?
- Ratio of the size of the compressed file to the original file. Lower ratios indicate better compression efficiency.
- What is run-length encoding (RLE)?
- A simple form of lossless data compression based on runs of data. Replaces repeated values with count and value pairs.
- What is lossy compression?
- Compression that reduces file size by removing some data, losing quality. Trades data fidelity for smaller file sizes.
- What does MPEG stand for?
- Moving Picture Experts Group. Standards organization for audio and video compression.
- What role does redundancy play in data compression?
- Higher redundancy increases potential for compression. Repeated patterns enable more effective compression.
- Which type of data is more compressible?
- Data with low entropy. Predictable data contains patterns for compression.
- What is the primary challenge of data compression?
- Balancing compression efficiency with data quality. Optimizing both compression ratio and acceptable quality.
- Identify the two main types of data compression.
- Lossy and lossless compression. These represent the fundamental approaches to data reduction.
- Which type of data is less compressible?
- Data with high entropy. Random data lacks patterns for compression algorithms.
- Identify a disadvantage of lossy compression.
- Loss of data quality and fidelity. Irreversible information loss reduces file quality.
- What is a common algorithm used for lossless compression?
- The Lempel-Ziv-Welch (LZW) algorithm. Dictionary-based algorithm for efficient lossless compression.
- What is a common algorithm used for lossy compression?
- The JPEG algorithm. Widely used for image compression with quality loss.
- Identify a file format that uses lossless compression.
- PNG. Image format that preserves all original pixel data.
- Identify a disadvantage of lossless compression.
- Larger file sizes compared to lossy compression. Perfect preservation requires more storage space.
- What is a bit rate?
- Number of bits processed per second in a compressed file. Determines data transmission speed and quality.
- What is the effect of compression on data transmission speed?
- Compression generally increases data transmission speed. Smaller files transfer faster over networks.
- How does reducing the bit rate affect file size?
- It decreases the file size. Lower bit rates mean more compression and smaller files.
- What is a codec?
- A device or program for encoding or decoding data streams. Software that compresses or decompresses digital media.
- Name a factor that affects the choice of compression method.
- The importance of data fidelity. Critical consideration when selecting compression type.
- Why is entropy important in data compression?
- Higher entropy indicates less potential for compression. Random data has high entropy and resists compression.
- Identify a use case for lossless compression.
- Medical imaging where data integrity is crucial. Critical applications require perfect data preservation.
- What is lossless compression?
- Compression that allows original data to be perfectly reconstructed. No information is permanently lost during compression.
- Calculate the compression ratio: original size 200 MB, compressed size 50 MB.
- 4:1. Original size divided by compressed size: .
- What is the result of decompressing a lossy file?
- The file may not be identical to the original. Lossy compression causes permanent information loss.
- What is the result of decompressing a lossless file?
- The file is identical to the original. Lossless compression preserves every bit of data.