diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-21 21:36:48 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-21 21:36:48 (GMT) |
commit | a425c3d5a264c556d31bdd88097c79246b533ea3 (patch) | |
tree | 2ee651277af2bb8d61ad824001aa2bbcbba54585 /Lib/zipfile.py | |
parent | 01317d2ed5b06310ab9cefa7eed5912819ea89c9 (diff) | |
download | cpython-a425c3d5a264c556d31bdd88097c79246b533ea3.zip cpython-a425c3d5a264c556d31bdd88097c79246b533ea3.tar.gz cpython-a425c3d5a264c556d31bdd88097c79246b533ea3.tar.bz2 |
Make lzma.{encode,decode}_filter_properties private.
These functions were originally added to support LZMA compression in the zipfile
module, and are not of interest for the majority of users.
They can be made public in 3.4 if there is user interest, but in the meanwhile,
I've opted to present a smaller, simpler API for the module's initial release.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index c127c2c..a6c07e6 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -495,9 +495,9 @@ class LZMACompressor: self._comp = None def _init(self): - props = lzma.encode_filter_properties({'id': lzma.FILTER_LZMA1}) + props = lzma._encode_filter_properties({'id': lzma.FILTER_LZMA1}) self._comp = lzma.LZMACompressor(lzma.FORMAT_RAW, filters=[ - lzma.decode_filter_properties(lzma.FILTER_LZMA1, props) + lzma._decode_filter_properties(lzma.FILTER_LZMA1, props) ]) return struct.pack('<BBH', 9, 4, len(props)) + props @@ -529,7 +529,7 @@ class LZMADecompressor: return b'' self._decomp = lzma.LZMADecompressor(lzma.FORMAT_RAW, filters=[ - lzma.decode_filter_properties(lzma.FILTER_LZMA1, + lzma._decode_filter_properties(lzma.FILTER_LZMA1, self._unconsumed[4:4 + psize]) ]) data = self._unconsumed[4 + psize:] |