Skip to content

Phase 1, Task 2: Convert process_gzip_to_gzip to chunk-based processing #569

@aram356

Description

@aram356

Parent: #563
Phase: #566
Depends on: Task 1 (encoder finalization fix)

Summary

process_gzip_to_gzip calls read_to_end() to decompress the entire body into memory. Convert to use process_through_compression for chunk-based processing, matching the deflate and brotli paths.

Changes

  • Replace read_to_end() + single process_chunk call with process_through_compression pattern
  • Caller calls encoder.finish() explicitly (enabled by Task 1 &mut W signature)
  • Add gzip round-trip correctness test

File: crates/trusted-server-core/src/streaming_processor.rs:183-225

Plan

See docs/superpowers/plans/2026-03-25-streaming-response.md — Task 2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions