A common pattern
A conventional whole-file path may buffer a large payload before returning a transformed copy.
Kraton / Streaming data / source-backed demo
Large inputs do not have to become one opaque upload just to apply a predictable transformation. The streaming demo processes data in chunks and carries only the small amount of state needed across chunk boundaries.
The trade-off
A common pattern
A conventional whole-file path may buffer a large payload before returning a transformed copy.
This Kraton demo
The stream-sanitizer demo masks card-like digit sequences across chunk boundaries and keeps memory proportional to the active chunk.
What is actually bounded
The example is useful because it makes the allowed inputs and actions explicit—not because it claims to solve every version of this task.
Where this example stops
Pattern-based masking is not a complete data-loss-prevention system. Validate the transformation against your own data and threat model.
One scenario at a time