Zipstream-ng

Latest version: v1.7.1

Safety actively analyzes 626983 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.7.1

- Fix issue where it was possible to add paths with arcnames that didn't match the path contents
(file ending with "/", directory not ending with "/")

1.7.0

- Add the ability to get information on added files using `ZipStream.info_list`. This function
replaces `ZipStream.get_info` which would only provide information on files that had already been
streamed.
- Deprecate `ZipStream.get_info`. It will continue to work until the next major version but
will now emit a warning when used.
- Reduce memory usage for sized `ZipStream` objects by updating the final size of the stream as
files are added instead of storing the required information so the size could be calculated later.

1.6.0

- Add the ability to provide a custom "walk" function to `ZipStream.add_path` for more control
over how directories are walked.
- Change the exception raised when trying to add a file that doesn't exist from a `ValueError` to a
more appropriate `FileNotFoundError`.
- Optimize the number of `os.stat` calls required to add a file.
- Fix issue where adding data with an arcname that contained a null byte would lead to an incorrect
size being calculated.
- When `ZipStream.add` is provided a size alongside an iterable, the size will now be used to
determine if Zip64 extensions are needed.

1.5.0

- Add `ZipStream.mkdir` method to make an empty directory inside the stream.
- Fix an issue where `ZipStream.get_info` would return incorrect values for `compress_level` in
cases where the compression level was specified, but had no effect (ie. when using
`ZIP_STORED`/`ZIP_LZMA`).
- Fix an edge case where top-level paths like `/` could be added with an empty arcname.
- Improve error messages for adding data as a directory and adding nonexistent paths.

1.4.0

- The expected size of data added to a `ZipStream` is now validated as it's generated. For unsized
`ZipStream`s a mismatch in expected vs. actual size emits a warning, for sized `ZipStream`s a
`RuntimeError` is raised.
- For sized `ZipStream`s, add the option to provide the total size of an iterable when adding it.
When the size is provided, the iterable will no longer have to immediately be read into memory to
compute it.

1.3.5

- Fix issue where adding data via an iterable to an unsized `ZipStream` wouldn't fully implement
Zip64 extensions. This caused some versions of `7z` to emit warnings (but still properly extract
the data).

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.