Skip to content

Conversation

@elizabethhealy
Copy link
Member

@elizabethhealy elizabethhealy commented Oct 3, 2025

Proposed Changes

  • add a new zipstream lib with segment-based streaming ZIP writer, ZIP64 modes
  • package is EXPERIMENTAL (and internal)
  • Introduce SegmentWriter for deterministic, out-of-order segment writing and true streaming output.
  • Add CRC32 combine (crc32combine) to compute payload CRC without buffering entire payload.
  • Implement zip primitives (headers, central directory, EOCD) with ZIP64 mode control (Auto/Always/Never) and signed data descriptors.
  • Replace legacy tdf3 writer; remove old writer tests and reader/writer harness.
  • Update reader tests and add ZIP64 mode tests and benchmarks.
  • Integrate new writer into SDK TDF creation; track total size from streamed segments + finalize bytes.
  • Adjust TDF tests’ expected sizes and tolerances to match new ZIP layout.

Notes:
Small archives may differ by ~40–60 bytes vs. legacy due to conditional ZIP64 extras and data descriptor signature; output remains ZIP-spec compliant.

Checklist

  • I have added or updated unit tests
  • I have added or updated integration tests (if appropriate)
  • I have added or updated documentation

Testing Instructions

@github-actions github-actions bot added comp:sdk A software development kit, including library, for client applications and inter-service communicati size/xl labels Oct 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 152.673686ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 83.70133ms

Standard Benchmark Metrics Skipped or Failed

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 378.386651ms
Throughput 264.28 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 39.515821096s
Average Latency 393.08261ms
Throughput 126.53 requests/second

NANOTDF Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 27.126276156s
Average Latency 270.241489ms
Throughput 184.32 requests/second

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 174.998832ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 103.192608ms

Standard Benchmark Metrics Skipped or Failed

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 366.168956ms
Throughput 273.10 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 37.704664844s
Average Latency 375.142185ms
Throughput 132.61 requests/second

NANOTDF Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 26.041170291s
Average Latency 259.466628ms
Throughput 192.00 requests/second

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 177.221142ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 100.541226ms

Standard Benchmark Metrics Skipped or Failed

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 358.474408ms
Throughput 278.96 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 38.731321697s
Average Latency 384.042926ms
Throughput 129.09 requests/second

NANOTDF Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 26.645946822s
Average Latency 265.554456ms
Throughput 187.65 requests/second

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 183.984742ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 100.866955ms

Standard Benchmark Metrics Skipped or Failed

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 354.865706ms
Throughput 281.80 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 38.546610458s
Average Latency 382.828939ms
Throughput 129.71 requests/second

NANOTDF Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 26.321777803s
Average Latency 262.366445ms
Throughput 189.96 requests/second

@elizabethhealy elizabethhealy changed the title feat: new archive lib, add segment-based streaming ZIP writer, ZIP64 modes feat(sdk): Experimental zipstream lib, add segment-based streaming ZIP writer, ZIP64 modes Oct 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 176.393035ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 98.659458ms

Standard Benchmark Metrics Skipped or Failed

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 356.664244ms
Throughput 280.38 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 38.176108322s
Average Latency 380.218058ms
Throughput 130.97 requests/second

NANOTDF Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 27.106137389s
Average Latency 270.043573ms
Throughput 184.46 requests/second

@elizabethhealy elizabethhealy marked this pull request as ready for review October 6, 2025 16:40
@elizabethhealy elizabethhealy requested review from a team as code owners October 6, 2025 16:40
@elizabethhealy elizabethhealy added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit b381179 Oct 6, 2025
38 checks passed
@elizabethhealy elizabethhealy deleted the dspx-1465-archive-for-streaming branch October 6, 2025 21:11
github-merge-queue bot pushed a commit that referenced this pull request Oct 10, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.9.0](sdk/v0.8.0...sdk/v0.9.0)
(2025-10-09)


### Features

* **sdk:** DSPX-1465 refactor TDF architecture with streaming support
and segment-based writing
([#2785](#2785))
([ea9b278](ea9b278))
* **sdk:** Experimental zipstream lib, add segment-based streaming ZIP
writer, ZIP64 modes
([#2782](#2782))
([b381179](b381179))
* **sdk:** sdk should optionally take in a logger
([#2754](#2754))
([f40d05f](f40d05f))


### Bug Fixes

* **core:** deprecate policy WithValue selector not utilized by RPC
([#2794](#2794))
([c573595](c573595))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:sdk A software development kit, including library, for client applications and inter-service communicati size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants