Commit Graph
5 Commits
Author SHA1 Message Date
Daniel Eggert a72d61d666 Make payload cases IMAPBuffer
The four raw-payload cases become IMAPBuffer so a large literal can be
handed in and out without a copy: FetchResponse.streamingBytes,
AppendCommand.messageBytes, AppendCommand.CatenateData.bytes,
CommandStreamPart.continuationResponse.

Review focus: writeBytes(IMAPBuffer) keeps payloads by reference
(ZeroCopyWriteTests); the parser's extractBuffer(upTo:) still copies.

Updates IMAPTool and the IMAPCommands append/continuation wrappers.

Public API breaks:
- The four cases above: ByteBuffer -> IMAPBuffer.

Removes the writeBuffer(inout ByteBuffer) shim from "Encode into an
EncoderOutputBuffer sink".
2026-11-24 09:47:34 +09:00
Daniel Eggert 3cd39758d4 Use [UInt8] for small model fields
Small fields (mailbox names, atoms, quoted strings, envelope fields,
base64, URLs, the authentication challenge, catenateURL, ...) become
[UInt8]. The four raw-payload cases stay ByteBuffer until "Make payload
cases IMAPBuffer".

The grammar's string productions return [UInt8]. The parser still runs
on ParseBuffer, so its cursor methods copy out of the ByteBuffer for now.

Review focus: the model files' encoders and ModifiedUTF7 on arrays.

Updates IMAPTool and the IMAPCommands catenate-URL wrapper.

Public API breaks:
- ~38 public declarations ByteBuffer -> [UInt8].
- ModifiedUTF7.EncodingRoundtripError.buffer -> .bytes.
- Response.authenticationChallenge and ContinuationRequest.data are
  [UInt8]; an empty challenge is [].

Internal: writeBufferAsBase64 -> writeBytesAsBase64; the ByteBuffer
writeIMAPString overload is gone.
2026-11-24 09:47:33 +09:00
Matt Diephouse f5fa7d3691 Implement OBJECTID+ extension (#840) 2026-10-30 13:47:17 +00:00
Daniel Eggert fbec780de3 Normalize malformed ENVELOPE address groups (#872) 2026-10-27 15:06:24 +01:00
Daniel Eggert 6c8cfaddcc Add a imperative IMAP client and an imap-tool CLI (#841) 2026-09-25 16:16:41 +01:00