Bzip2 adopts the new compression algorithm, which is better than the traditional LZ77/LZ78 compression algorithm. If no compression file is added, the compressed file .bz2 will be uploaded and the original file will be deleted.
Syntax
Bzip2 [-cdfhkLstvVz] [-- repetitive-best] [-- repetitive-fast] [-compression grade] [file to be compressed]
Parameters:
- -C or -- stdout sends the compression and decompression results to the standard output.
- -D or -- decompress.
- -F or -- force bzip2 will not overwrite the existing file if the output file has the same name as the existing file during compression or decompression. To overwrite data, use this parameter.
- -H or -- help displays help.
- -K or -- keep bzip2 will delete the original file after compression or decompression. To retain the original file, use this parameter.
- -S or -- small reduces the memory usage during program execution.
- -T or -- test the integrity of the. Bz2 compressed file.
- -V or -- verbose displays detailed information when compressing or extracting files.
- -Z or -- compress enforces compression.
- -L, -- license,
- -V or -- version displays version information.
- -- Repetitive-best: this parameter can be used to improve the compression effect if duplicate data appears in the file.
- -- Repetitive-fast: this parameter can be used to speed up execution if duplicate data appears in the file.
- -The block size when the compression level is compressed.
Instance
Decompress the. Bz2 file
Root@w3cschool.cc ~ # Bzip2-v temp.bz2 // The detailed processing information is displayed in the extracted file.
Compressed file
Root@w3cschool.cc ~ # Bzip2-c a. c B. c. c
Check File Integrity
Root@w3cschool.cc ~ # Bzip2-t temp.bz2