Your build starts here
Replace bracketed details with your own goal, context, and checks. Keep the first build small enough to inspect.
Implement a bounded-memory text transformation for [local fixture file] with an agreed encoding and output format. Use a streaming decoder or the runtime's text stream abstraction instead of decoding each arbitrary byte chunk independently. Create fixtures where a multibyte character, a newline sequence, and a logical record each cross the chosen chunk boundary. Verify that chunk sizes of one byte, a small prime size, and a normal buffer produce equivalent logical output. If resumption is required, define the decoder and record state that the checkpoint represents; do not assume an opaque text position is an ordinary arithmetic byte offset. Write to a separate partial output and finalize only after decoding and validation succeed. Test cancellation and a truncated character at end of input. Report peak buffering assumptions, output equivalence, and how failed partial output is identified or recovered.Make this prompt yours
Use for large text imports and transcoders. A text-stream position or decoder state must be handled according to that stream's documented contract.
You might also hear
- incremental decoding
- UTF-8 chunk boundary
- stream checkpoint
- partial character
- bounded memory
The docs behind it
These references explain the underlying concepts and APIs. The prompt templates and project plans are original examples to adapt to your own setup.
Research sources reviewed .
Editorial review · October 28, 2026
Limited: Original instructional template; not executed. Incremental decoding handles split characters, and Python text positions are opaque rather than arithmetic byte offsets; checkpoint/output requirements are original exercise design.