Computer Science – Data storage and compression | e-Consult
Data storage and compression (1 questions)
Login to see all questions.
Click on a question to view the answer
Two common data compression methods are lossless compression and lossy compression.
Lossless Compression: This method reduces file size without losing any of the original data. It works by identifying and eliminating redundancy in the data. The compressed file can be perfectly reconstructed to its original state. It is suitable for data where accuracy is paramount.
- Principle: Identifying and replacing repeating patterns with shorter codes. For example, if a character appears frequently, it can be represented by a shorter code than if it appears infrequently.
- Example File Format: ZIP is a widely used lossless compression format for archiving files. PNG is a lossless image format often used for graphics with sharp lines and text.
Lossy Compression: This method achieves higher compression ratios by discarding some of the original data. The discarded data is deemed less important to the overall quality of the file. This is acceptable for multimedia where a slight loss in quality is not noticeable.
- Principle: Removing data that is considered perceptually less important. For images, this might involve reducing the number of colors or removing high-frequency details. For audio, it might involve removing frequencies that are masked by louder sounds.
- Example File Format: JPEG is a lossy image format commonly used for photographs. MP3 is a lossy audio format widely used for music. MPEG is a lossy video format used for streaming and video recording.