3 Data Compression Techniques

Multimedia Computing · Unit 3

Data Compression Techniques

Exam-focused notes for Data Compression Techniques (Multimedia Computing, BIT356): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

Data Compression Techniques in short

Audio, images and video take a lot of space. Compression makes them smaller so they can be stored and sent easily. This chapter covers the main methods, with worked examples.

Data Compression Techniques: notes

Data compression definition and necessity

Data compression means representing data with fewer bits than the original, by removing redundancy (repeated or unneeded information). The reverse process is decompression.

Compression is needed because:

  • Uncompressed media is huge. One minute of 640 x 480, 24-bit video at 25 frames per second needs about 1,382 MB.
  • It saves storage space and cost.
  • It reduces transmission time and the bandwidth needed.
  • It lets real-time playback work on slow networks.

The compression ratio is the original size divided by the compressed size. A 10 : 1 ratio means the file became one tenth of its size.

Redundancy comes from several places:

  • Repeated symbols in text.
  • Neighbouring pixels with similar colour.
  • Similar frames in video.
  • Details that the eye or ear cannot notice.

Lossy compression methods

In lossy compression, some information is thrown away for ever. The decoded data is close to the original but not identical. It gives high compression ratios.

  • It removes details that people hardly notice, such as very high sound frequencies or fine colour changes.
  • Examples: JPEG (images), MP3 and AAC (audio), MPEG and H.264 (video).
  • It suits photographs, music and video, where small errors are acceptable.
  • It is not suitable for text, programs or medical images.

What this unit covers

  • Data compression definition and necessity
  • Lossy compression methods
  • Lossless compression methods
  • Huffman coding algorithm
  • DCT compression mode
  • Expanded lossy DCT mode
  • Compression mechanism comparison

Data compression definition and necessity

2081 · 5 marks

Why is data compression needed? How is lossy compression different from lossless compression? [5]

Data compression is needed for the following reasons: 1. Storage Space Reduction: Compressed data requires significantly less disk or memory space, allowing more data to be stored on the same physical medium. 2. Faster Data Transmission: Smaller file sizes can be transmitted over networks more qu...

Open this answer on its own page →

Expanded lossy DCT mode

0 · 10 marks

What is data compression? How working mechanism of lossy DCT mode is different from expanded lossy DCT mode of data compression?[10]

Show solved answer

Model Answer: Data Compression and DCT Modes

What is Data Compression?

Data compression is a technique used to reduce the size of data files by removing redundancy and unnecessary information. It involves encoding information using fewer bits than the original representation, thereby reducing storage space and transmission bandwidth requirements.

Key objectives of data compression:

  • Reduce file size for efficient storage
  • Minimize transmission time and bandwidth usage
  • Maintain data integrity (in lossless) or acceptable quality (in lossy)

Lossy DCT Mode vs. Expanded Lossy DCT Mode

Lossy DCT (Discrete Cosine Transform) Mode

Working Mechanism:

  • Divides image/data into fixed-size blocks (typically 8×8 pixels)
  • Applies DCT to transform spatial domain data into frequency domain
  • Quantizes high-frequency components by dividing by quantization matrix values
  • Discards or heavily reduces high-frequency coefficients (human eye is less sensitive to these)
  • Applies entropy coding (Huffman/arithmetic coding) to compress further
  • Result: Irreversible compression with some quality loss

Characteristics:

  • Simple block-based processing
  • Moderate compression ratios
  • Visible artifacts at block boundaries
  • Suitable for JPEG compression

Expanded Lossy DCT Mode

Working Mechanism:

  • Extends standard DCT by processing overlapping blocks instead of fixed non-overlapping blocks
  • Uses window functions (e.g., sine window) to smooth transitions between blocks
  • Applies DCT on overlapped regions to reduce blocking artifacts
  • Quantization and entropy coding similar to standard DCT
  • Result: Better quality with reduced block boundary artifacts

Key Differences:

AspectLossy DCTExpanded Lossy DCT
Block ProcessingNon-overlapping fixed blocksOverlapping blocks with windowing
ArtifactsVisible block boundariesSmoother transitions, fewer artifacts
Compression RatioHigherSlightly lower (due to overlap)
QualityModerateBetter visual quality
Computational CostLowerHigher (overlap processing)
ApplicationStandard JPEGAdvanced codecs (MPEG, H.264)

Summary

The primary difference is that expanded lossy DCT uses overlapping blocks with window functions to eliminate blocking artifacts present in standard lossy DCT, resulting in superior visual quality at the cost of slightly reduced compression efficiency and increased computation.

Open this answer on its own page →

Huffman coding algorithm

0 · 5 marks

Let A = {a/20, b/15, c/5, d/15, e/45} be the alphabet and its frequency distribution. Now show how Huffman Coding works. Make your assumptions if required. [5]

Alphabet with frequencies: Symbol Frequency ------------------- a 20 b 15 c 5 d 15 e 45 Total frequency $= 20 + 15 + 5 + 15 + 45 = 100$ - Binary Huffman tree; left branch = 0, right branch = 1. - When combining, pick the two nodes with the smallest frequency (ties broken arbitrarily). $$c(5),\ b(...

Open this answer on its own page →