Primary Categories

Types of Data Compression

Run-Length Encoding (RLE)

Replaces sequences of repeated identical values with a single value and a count.

Example: AAAAABBBCC5A3B2C

Best for data with long runs of identical bytes (images, simple graphics).

Dictionary Compression

Replaces repeated patterns or sequences with shorter references to a dictionary.

Example: the cat and the dog → Store "the" once, reference it twice

Used in LZ77, LZ78, LZW, DEFLATE (ZIP/GZIP). Excellent for text and structured data.

Entropy Encoding

Assigns shorter codes to more frequent symbols and longer codes to rarer ones.

Example: 'E' appears 50% of the time → use 1 bit. 'Z' appears 0.1% → use 10 bits

Includes Huffman coding, arithmetic coding, and range coding. Achieves near-optimal compression.

Slide 5
Previous Next