Skip to content

Commit 6133a3f

Browse files
LarhzuJiaT75
authored andcommitted
xz: Man page: Add more examples of LZMA2 options with BCJ filters.
1 parent 50255fe commit 6133a3f

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

src/xz/xz.1

+31-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.\" This file has been put into the public domain.
77
.\" You can do whatever you want with this file.
88
.\"
9-
.TH XZ 1 "2024-01-22" "Tukaani" "XZ Utils"
9+
.TH XZ 1 "2024-01-23" "Tukaani" "XZ Utils"
1010
.
1111
.SH NAME
1212
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,
18661866
the compression ratio may be improved slightly if
18671867
the LZMA2 options are set to match the
18681868
alignment of the selected BCJ filter.
1869-
For example, with the IA-64 filter, it's good to set
1870-
.B pb=4
1871-
or even
1869+
Examples:
1870+
.RS
1871+
.IP \(bu 3
1872+
IA-64 filter has 16-byte alignment so
18721873
.B pb=4,lp=4,lc=0
1874+
is good
18731875
with LZMA2 (2^4=16).
1874-
The x86 filter is an exception;
1875-
it's usually good to stick to LZMA2's default
1876-
four-byte alignment when compressing x86 executables.
1876+
.IP \(bu 3
1877+
RISC-V code has 2-byte or 4-byte alignment
1878+
depending on whether the file contains
1879+
16-bit compressed instructions (the C extension).
1880+
When 16-bit instructions are used,
1881+
.B pb=2,lp=1,lc=3
1882+
or
1883+
.B pb=1,lp=1,lc=3
1884+
is good.
1885+
When 16-bit instructions aren't present,
1886+
.B pb=2,lp=2,lc=2
1887+
is the best.
1888+
.B readelf \-h
1889+
can be used to check if "RVC"
1890+
appears on the "Flags" line.
1891+
.IP \(bu 3
1892+
ARM64 is always 4-byte aligned so
1893+
.B pb=2,lp=2,lc=2
1894+
is the best.
1895+
.IP \(bu 3
1896+
The x86 filter is an exception.
1897+
It's usually good to stick to LZMA2's defaults
1898+
.RB ( pb=2,lp=0,lc=3 )
1899+
when compressing x86 executables.
1900+
.RE
18771901
.IP ""
18781902
All BCJ filters support the same
18791903
.IR options :

0 commit comments

Comments
 (0)