Command: bzip2

  BZIP2 compresses files using the Burrows-Wheeler block sorting text
  compression algorithm, and Huffman coding. Compression is generally
  considerably better than that achieved by more conventional LZ77/LZ78-
  based compressors, and approaches the performance of the PPM family
  of statistical compressors.
  The command-line options are deliberately very similar to those of GNU
  gzip, but they are not identical.
  BUNZIP2 (or BZIP2 -d) decompresses all specified files. Files which
  were not created by bzip2 will be detected and ignored, and a warning
  issued.
  BZCAT decompresses files to stdout.
  BZIP2REC recovers data from damaged BZIP2 files.
  IMPORTANT: BZIP2 only compresses /decompresses SINGLE FILES, NO FOLDERS!
  When creating a .bz2 file the original file is DELETED, so do not forget
  the option -k --keep!

Syntax:

  bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ]
  bunzip2 [ -fkvsVL ] [ filenames ... ]
  bzcat [ -s ] [ filenames ... ]
  bzip2rec filename

Options:

  -h --help         print this message
  -d --decompress   force decompression
  -z --compress     force compression
  -k --keep         keep (don't delete) input files
  -f --force        overwrite existing output files
  -t --test         test compressed file integrity
  -c --stdout       output to standard out
  -q --quiet        suppress noncritical error messages
  -v --verbose      be verbose (a 2nd -v gives more)
  -l --license      display software version & license
  -V --version      display software version & license
  -n                select output file name rule 2.
                    rule 1: filename preserved, extension truncated.
                    default is output file name rule1.
                    rule 2: filename truncated, extension preserved.
                    This flag is only available on plain DOS and
                    WIN9x with LFN=n.
  -s --small        use less memory (at most 2500k)
  -1 .. -9          set block size to 100k .. 900k
  --fast            alias for -1
  --best            alias for -9

  If invoked as 'bzip2', default action is to compress.
             as 'bunzip2', default action is to decompres.
             as 'bzcat', default action is to decompress to stdout.
  If no file names are given, bzip2 compresses or decompresses from
  standard input to standard output. You can combine short flags,
  so '-v -4' means the same as -v4 or -4v, &c.

Comments:

  BZIP2 has an extensive documentation that is beyond the scope of
  this help. For more information see:
  https://sourceware.org/bzip2/ OR:
  https://gitlab.com/FreeDOS/archiver/bz2

Examples:

    bzip2 -z -k -v --best testfile.exe  (creates compressed file
                            "testfile.exb", removes testfile.exe
                            without "-z")
    bunzip2 -d -v vim.exb  (unzips vim.exb to vim.ex)
  In a folder:
    bzip2 -z -v -4 *.* (zips all files in this folder)
    bunzip2 -v *.*  (unzips all files)

See also:

  7zdec
  arj
  cabext
  gzip
  lpq1
  lzip
  lzma
  lzop
  p7zip
  slicer
  tar
  unzip
  zip
  zoo

  Copyright © 1996-2019 Julian Seward, help version 2023 W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.