pypi lz4 2.1.0
Enhance support for block decompression with unknown size of decompressed data

latest releases: 4.3.3, 4.3.2, 4.3.1...
5 years ago

This release changes the handling of errors for block decompression when uncompressed_size > 0. In this case, we no longer check that the uncompressed data has exactly the size specified by uncompressed_size: this argument is now used as an upper bound.

In addition, we introduce a new exception: LZ4BlockError which is raised whenever the LZ4 library fails.

These two changes together allow "guessing" of the uncompressed data size: simply set uncompressed_size to a number and try decompress, and catch LZ4BlockError. If LZ4BlockError is raised, increase uncompressed_size and try again.

See the documentation for more details and examples.

Don't miss a new lz4 release

NewReleases is sending notifications on new releases.