xz: Man page: Add more examples of LZMA2 options with BCJ filters.

This commit is contained in:
Lasse Collin 2024-01-23 16:11:54 +02:00 committed by Jia Tan
parent 50255feeaa
commit 6133a3f300
1 changed files with 31 additions and 7 deletions

View File

@ -6,7 +6,7 @@
.\" This file has been put into the public domain. .\" This file has been put into the public domain.
.\" You can do whatever you want with this file. .\" You can do whatever you want with this file.
.\" .\"
.TH XZ 1 "2024-01-22" "Tukaani" "XZ Utils" .TH XZ 1 "2024-01-23" "Tukaani" "XZ Utils"
. .
.SH NAME .SH NAME
xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
@ -1866,14 +1866,38 @@ Since the BCJ-filtered data is usually compressed with LZMA2,
the compression ratio may be improved slightly if the compression ratio may be improved slightly if
the LZMA2 options are set to match the the LZMA2 options are set to match the
alignment of the selected BCJ filter. alignment of the selected BCJ filter.
For example, with the IA-64 filter, it's good to set Examples:
.B pb=4 .RS
or even .IP \(bu 3
IA-64 filter has 16-byte alignment so
.B pb=4,lp=4,lc=0 .B pb=4,lp=4,lc=0
is good
with LZMA2 (2^4=16). with LZMA2 (2^4=16).
The x86 filter is an exception; .IP \(bu 3
it's usually good to stick to LZMA2's default RISC-V code has 2-byte or 4-byte alignment
four-byte alignment when compressing x86 executables. depending on whether the file contains
16-bit compressed instructions (the C extension).
When 16-bit instructions are used,
.B pb=2,lp=1,lc=3
or
.B pb=1,lp=1,lc=3
is good.
When 16-bit instructions aren't present,
.B pb=2,lp=2,lc=2
is the best.
.B readelf \-h
can be used to check if "RVC"
appears on the "Flags" line.
.IP \(bu 3
ARM64 is always 4-byte aligned so
.B pb=2,lp=2,lc=2
is the best.
.IP \(bu 3
The x86 filter is an exception.
It's usually good to stick to LZMA2's defaults
.RB ( pb=2,lp=0,lc=3 )
when compressing x86 executables.
.RE
.IP "" .IP ""
All BCJ filters support the same All BCJ filters support the same
.IR options : .IR options :