I'll explain the basic ideas of the bzip2 algorithm, using text compression as an example.
The key ingredients are:
* The Burrows-Wheeler transform (a reversible "quasi-sorting" algorithm)
* Move-to-Front transformation (a simple trick to exploit local properties for compression)
* Huffman encoding (as one algorithm for entropy encoding)
Maybe I'll also briefly discuss Arithmetic Coding (which is not used in bzip2 due to patent regulations).
I will not discuss any implementation details.