Skip to content

Implement streaming zip writer and tests - #124

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_977770317
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_977770317

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Implement streaming zip writer and tests

Adds BufferedZipStreamWriter, FsZipStreamWriter and the ZipStreamWriter
facade, which write a zip archive sequentially to a buffer or a file without
seeking. Compression levels are validated per method (Deflate/Bzip2 1-9,
Xz 0-9, Zstd -7..22, none for Stored); writing with no open entry is an error
instead of silently succeeding; appending to a missing archive reports
NotFound rather than creating an empty file; entry names and source paths
must be non-empty, NUL-free and valid UTF-8 (kInvalidArgument instead of
lossy conversion); OS and zip errors keep canonical codes. Move-assigning over
an open writer finalizes the overwritten writer and leaves the source empty.
Includes unit tests.

@google-cla

google-cla Bot commented Sep 15, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_977770317 branch 2 times, most recently from bff9114 to efcf007 Compare September 21, 2026 10:44
@copybara-service
copybara-service Bot force-pushed the test_977770317 branch 4 times, most recently from 696e358 to e453a9f Compare October 21, 2026 14:42
@copybara-service
copybara-service Bot force-pushed the test_977770317 branch 9 times, most recently from fe35ea4 to fc12b43 Compare November 1, 2026 19:30
@copybara-service copybara-service Bot changed the title Implement streaming zip writer, tests, and benchmarks Implement streaming zip writer and tests Nov 1, 2026
@copybara-service
copybara-service Bot force-pushed the test_977770317 branch 8 times, most recently from e08fc37 to ef67095 Compare November 3, 2026 09:41
Adds `BufferedZipStreamWriter`, `FsZipStreamWriter` and the `ZipStreamWriter`
facade, which write a zip archive sequentially to a buffer or a file without
seeking. Compression levels are validated per method (Deflate/Bzip2 1-9,
Xz 0-9, Zstd -7..22, none for Stored); writing with no open entry is an error
instead of silently succeeding; appending to a missing archive reports
NotFound rather than creating an empty file; entry names and source paths
must be non-empty, NUL-free and valid UTF-8 (kInvalidArgument instead of
lossy conversion); OS and zip errors keep canonical codes. Move-assigning over
an open writer finalizes the overwritten writer and leaves the source empty.
Includes unit tests.

PiperOrigin-RevId: 977770317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants