Skip to content

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Jan 10, 2024

Intended to be used when constructing zip files via a system that can parallelize and cache all actions including compressing individual input file contents so that you can distribute actions & avoid recomputation.

This also adds the missing ability to pass in pre-constructed ZipInfo to the write method as pre-compressed data needs its original file_size and uncompressed data CRC to also have been pre-computed.

Intended to be used when constructing zip files via a system that can
parallelize and cache all actions including compressing individual input
file contents so that you can distribute actions & avoid recomputation.
Comment on lines +1016 to +1017
f"Bad CRC-32 for file {self.name!r} expected "
f"{hex(self._expected_crc)} != {hex(self._running_crc)}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you keep the beginning of the error message identical to keep compatibility?
If not, then it could be easier to read if it was like bad crc32 {got value} for file {name}, expected {expected value}. For now it’s slightly unpleasant to read about bad value, expected, expected, bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants