PACKAGE.md 1.6 KB

Bzip2

Bzip2 is a freely available, patent-free, high-quality data compressor. It provides significantly better compression than traditional gzip compressors, especially for text files, by using the Burrows-Wheeler block sorting text compression algorithm combined with Huffman coding.

Features

  • High compression ratio, particularly effective on text files
  • Patent-free implementation
  • Cross-platform compatibility
  • Recovery tool for damaged compressed files
  • Standard Unix-style command-line interface

Included Programs

  • bzip2: Compresses files using the Burrows-Wheeler algorithm
  • bunzip2: Decompresses bzip2 compressed files (link to bzip2)
  • bzcat: Decompresses files to standard output
  • bzip2recover: Attempts to recover data from damaged bzip2 files
  • bzgrep, bzegrep, bzfgrep: Search within bzip2 compressed files
  • bzdiff, bzcmp: Compare bzip2 compressed files
  • bzmore, bzless: View bzip2 compressed files

Library

  • libbz2: Shared library providing bzip2 compression and decompression functions for other applications

Installation Notes

This package follows the Linux From Scratch installation guidelines, including:

  • Installation of shared library with proper symlinks
  • Relative symbolic links for portability
  • Documentation installation
  • Removal of unnecessary static library

Usage Examples

```bash

Compress a file

bzip2 myfile.txt

Decompress a file

bunzip2 myfile.txt.bz2

View compressed file without decompressing

bzcat myfile.txt.bz2

Search within compressed files

bzgrep "pattern" logfile.bz2