Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-115988: Add missing ARM64 and RISCV filter in lzma module #115989

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 37 additions & 6 deletions Doc/library/lzma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,23 @@ options. Valid filter IDs are as follows:

* Branch-Call-Jump (BCJ) filters:

* :const:`FILTER_X86`
* :const:`FILTER_IA64`
* :const:`FILTER_ARM`
* :const:`FILTER_ARMTHUMB`
* :const:`FILTER_POWERPC`
* :const:`FILTER_SPARC`
* :const:`!FILTER_X86`
* :const:`!FILTER_IA64`
* :const:`!FILTER_ARM`
* :const:`!FILTER_ARMTHUMB`
* :const:`!FILTER_POWERPC`
* :const:`!FILTER_SPARC`
* :const:`!FILTER_ARM64`

Only works if lzma runtime library version is 5.4.0 or later.

.. versionadded:: 3.13

* :const:`!FILTER_RISCV`

Only works if lzma runtime library version is 5.6.0 or later.

.. versionadded:: 3.13

A filter chain can consist of up to 4 filters, and cannot be empty. The last
filter in the chain must be a compression filter, and any other filters must be
Expand Down Expand Up @@ -385,6 +396,26 @@ These filters support one option, ``start_offset``. This specifies the address
that should be mapped to the beginning of the input data. The default is 0.


Information about the version of the lzma library in use is available through
gpshead marked this conversation as resolved.
Show resolved Hide resolved
the following constants:


.. data:: LZMA_VERSION

The version string of the lzma library that was used for building the module.
This may be different from the lzma library actually used at runtime, which
is available as :const:`LZMA_RUNTIME_VERSION`.

.. versionadded:: 3.13


.. data:: LZMA_RUNTIME_VERSION

The version string of the lzma library actually loaded by the interpreter.

.. versionadded:: 3.13


Examples
--------

Expand Down
1 change: 1 addition & 0 deletions Lib/lzma.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"CHECK_ID_MAX", "CHECK_UNKNOWN",
"FILTER_LZMA1", "FILTER_LZMA2", "FILTER_DELTA", "FILTER_X86", "FILTER_IA64",
"FILTER_ARM", "FILTER_ARMTHUMB", "FILTER_POWERPC", "FILTER_SPARC",
"FILTER_ARM64", "FILTER_RISCV",
"FORMAT_AUTO", "FORMAT_XZ", "FORMAT_ALONE", "FORMAT_RAW",
"MF_HC3", "MF_HC4", "MF_BT2", "MF_BT3", "MF_BT4",
"MODE_FAST", "MODE_NORMAL", "PRESET_DEFAULT", "PRESET_EXTREME",
Expand Down