summaryrefslogtreecommitdiff
path: root/dedup/compression.py
AgeCommit message (Collapse)Author
2021-12-29DecompressedStream: eliminate redundant closed fieldHelmut Grohne
2020-02-16drop support for Python 2.xHelmut Grohne
2016-06-09DecompressedStream: fix decompression without flushHelmut Grohne
In Python 3.x, lzma.LZMADecompressor doesn't have a flush method.
2016-05-22DecompressedStream: implement readlineHelmut Grohne
Iteration over file-like is required by deb822.Packages.iter_paragraphs.
2016-05-01push more functionality into DebExtractorHelmut Grohne
The handle_ar_member and handle_ar_end methods now have a default implementation adding further handlers handle_debversion, handle_control_tar and handle_data_tar. In that process two additional bugs were fixed: * decompress_tar was wrongly passing errors="surrogateescape" for Python 2.x even though that's only supported for Python 3.x. * The use of decompress actually passes the extension as unicode.
2016-04-28decouple a function decompress out of decompress_tarHelmut Grohne
Building on the previous commit, add a decompress function that turns a compressed filelike into a decompressed filelike. Use it to decouple the decompression step.
2016-04-28extend functionality of DecompressedStreamHelmut Grohne
It now supports: * tell() * seek(absolute_position), forward only * close() * closed This is sufficient for putting it as a fileobj into tarfile.TarFile. By doing so we can decouple decompression from tar processing, which eases papering over the Python 2.x vs Python 3.x differences.
2015-04-16element access on bytes yields int in py3kHelmut Grohne
2015-04-16zlib.crc32 behaves inconsistently on py2 vs py3Helmut Grohne
zlib.crc32 returns a int32_t on py2 and a uint32_t on py3.
2015-04-16distinguish bytes from unicode for py3kHelmut Grohne
2014-02-19GzipDecompressor: don't treat checksum as garbage trailerHelmut Grohne
2013-02-21move compression functions to module dedup.compressionHelmut Grohne