Skip to content

Implement streaming zip reader and tests - #118

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_977770313
Nov 9, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_977770313

Conversation

@copybara-service

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

Copy link
Copy Markdown

Implement streaming zip reader and tests

Adds BufferedZipStreamReader, FsZipStreamReader and the ZipStreamReader
facade, which read a zip archive sequentially from a buffer or a file without
seeking, plus a chunked ReadBytes(max_bytes) on the entry types. An archive
or stream reader refuses to open a second entry while one is still alive
(kFailedPrecondition), and a stream reader becomes unusable after a failed
ReadNextFile*.

Reader and archive APIs now return canonical error codes: OS errors such as
NotFound are propagated; paths must be non-empty, NUL-free and valid UTF-8;
moved-from archives report kFailedPrecondition; and GetFileByIndex* reports
kInvalidArgument / kFailedPrecondition / kUnimplemented instead of kOutOfRange
for corrupt, encrypted or unsupported entries. Also adds IsNone() on the
archive types and data(), size(), empty() and an absl::string_view
conversion on RustVecU8Wrapper. Includes unit tests.

@google-cla

google-cla Bot commented Sep 10, 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_977770313 branch 12 times, most recently from c9d5de5 to 4b9056a Compare September 16, 2026 11:05
@copybara-service
copybara-service Bot force-pushed the test_977770313 branch 5 times, most recently from 3519960 to ff49b07 Compare October 21, 2026 15:18
@copybara-service
copybara-service Bot force-pushed the test_977770313 branch 11 times, most recently from b5b7bee to 0c23c68 Compare November 1, 2026 19:29
@copybara-service copybara-service Bot changed the title Implement streaming zip reader, tests, and benchmarks Implement streaming zip reader and tests Nov 1, 2026
@copybara-service
copybara-service Bot force-pushed the test_977770313 branch 11 times, most recently from 7377643 to 1531d1d Compare November 9, 2026 04:29
Adds `BufferedZipStreamReader`, `FsZipStreamReader` and the `ZipStreamReader`
facade, which read a zip archive sequentially from a buffer or a file without
seeking, plus a chunked `ReadBytes(max_bytes)` on the entry types. An archive
or stream reader refuses to open a second entry while one is still alive
(kFailedPrecondition), and a stream reader becomes unusable after a failed
`ReadNextFile*`.

Reader and archive APIs now return canonical error codes: OS errors such as
NotFound are propagated; paths must be non-empty, NUL-free and valid UTF-8;
moved-from archives report kFailedPrecondition; and `GetFileByIndex*` reports
kInvalidArgument / kFailedPrecondition / kUnimplemented instead of kOutOfRange
for corrupt, encrypted or unsupported entries. Also adds `IsNone()` on the
archive types and `data()`, `size()`, `empty()` and an `absl::string_view`
conversion on `RustVecU8Wrapper`. Includes unit tests.

PiperOrigin-RevId: 1017012214
@copybara-service
copybara-service Bot merged commit 6e886f1 into main Nov 9, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_977770313 branch November 9, 2026 04:37
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