Enter your data on the input page and choose which compression algorithm to animate.
A sequence of identical bits
1111 or 0000
A word that directly stores bits without compression
Bits that stop a run from happening
00100000 (1 is the dirty bit)
The Diff Checker helps you verify if your compression implementation is working correctly by comparing your output with the expected results.
WAH compression works by encoding sequences of bits in two ways:
This example demonstrates WAH compression with:
BBC focuses on compressing runs of zero bits. It can store runs of various lengths and also handles “dirty bits” to indicate small interruptions in zero runs. If more runs or literals need encoding, additional header bytes are used. BBC is only avalible in wordsize 8, where it compresses runs and literals of 8 bits, in compression words which are also 8 bits.
111 for run header).This example demonstrates BBC compression with:
PLWAH works very similarly to WAH, but reserves bits to encode dirty bit positions. For runs of identical bits, the first two bits behave like WAH’s run indicators, while the next 5 bits track the dirty bit location. The following bits state the number of runs.
This demonstration shows a literal word, followed by runs ending on a dirty bit.
VAL builds on WAH but breaks each word into multiple segments. For a 16-bit word with 2 segments, compression is done in 7-bit chunks. The first bit indicates whether each segment is a run or a literal. If a segment is a run, its first bit shows whether it’s a run of ones or zeros, with the remainder tracking the count.
This sequence presents a literal segment followed by a run, then another run ending in a literal.
Head over to the Animation page to try it yourself! Experiment with different inputs, test various algorithms, and see how bitmap compression works in real-time. The best way to learn is by doing - try entering your own bit patterns and watch how they get compressed.