1D1C - bunzip2

a block-sorting file compressor

bunzip2 - a block-sorting file compressor

1. To compress file input.txt it deletes original

$ bzip2 -z input.txt

image.png

will give input.txt.bz2 (Refer image).

2. To decompress the input.txt.bz2

$ bzip2 -d input.txt.bz2

image.png

3. To compress file input.txt but does not deletes the original file.

$ bzip2 -k input.txt

image.png

4. To check the integrity of file and to check file is corrupt or not

$ bzip2 -t input.txt.bz2

image.png

5. To show the compression ratio for each file processed in verbose mode

$ bzip2 -v input.txt

image.png