It uses multiple layers, including Move-to-front (MTF) transforms and Huffman coding, to achieve its high compression ratio.
If you are working in a terminal, here is how you interact with it according to the ManKier bzip2 manual : bzip2 filename Decompress: bzip2 -d filename.bz2 (or simply use bunzip2 ) Check Integrity: bzip2 -t filename.bz2
Unlike ZIP or RAR, bzip2 is designed to compress only one file at a time. For multiple files, users typically pair it with the tar command.
For more technical details on the underlying library, you can explore the Sourceware bzip2 manual .