[issue6715] xz compressor support

Martin v. Löwis report at bugs.python.org
Sun Oct 31 17:43:25 CET 2010


Martin v. Löwis <martin at v.loewis.de> added the comment:

After starting to review the code, I'm becoming skeptical whether this is the right approach. This does way to much action in C, and thus becomes complicated but also limited.

An alternative approach would be to just expose lzma_code to Python, and then integrate that into the io architecture, i.e. as a subclass of RawIOBase. I.e. LZMAFile would go; if you want to compress to a file, use FileIO instead, and wrap that with a LZMAIO (say). LZMACompressor and Decompressor could stay if desired, although it seems more liblzma-like to have a single object for both compression and decompression.

In addition, I find the options object too complicated. It seems to serve documentation purposes only, so I wonder whether it could be reduced in code size.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6715>
_______________________________________


More information about the Python-bugs-list mailing list