diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-05-06 21:01:27 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-05-06 21:01:27 (GMT) |
commit | f55b329edc911dde495abfcfe0b052040d101cc5 (patch) | |
tree | cabec80d7b4c048349354b6f58b89aa040a3d757 /Doc/library/lzma.rst | |
parent | 75d5d8c78157f24f07b3fc122b7aeb07e0eea8ec (diff) | |
download | cpython-f55b329edc911dde495abfcfe0b052040d101cc5.zip cpython-f55b329edc911dde495abfcfe0b052040d101cc5.tar.gz cpython-f55b329edc911dde495abfcfe0b052040d101cc5.tar.bz2 |
Add lzma.{encode,decode}_filter_properties().
Diffstat (limited to 'Doc/library/lzma.rst')
-rw-r--r-- | Doc/library/lzma.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index cae05b6..9bc82be 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -235,6 +235,32 @@ Miscellaneous feature set. +.. function:: encode_filter_properties(filter) + + Return a :class:`bytes` object encoding the options (properties) of the + filter specified by *filter* (a dictionary). + + *filter* is interpreted as a filter specifier, as described in + :ref:`filter-chain-specs`. + + The returned data does not include the filter ID itself, only the options. + + This function is primarily of interest to users implementing custom file + formats. + + +.. function:: decode_filter_properties(filter_id, encoded_props) + + Return a dictionary describing a filter with ID *filter_id*, and options + (properties) decoded from the :class:`bytes` object *encoded_props*. + + The returned dictionary is a filter specifier, as described in + :ref:`filter-chain-specs`. + + This function is primarily of interest to users implementing custom file + formats. + + .. _filter-chain-specs: Specifying custom filter chains |