Add PureXML.parse(pullingBytes:) and events(pullingBytes:) over an incremental byte source (() -> UInt8?). StreamingDecoder detects the encoding from the leading bytes, strips any BOM, and yields one scalar at a time as a Character, so a byte stream is never fully buffered. UTF-8 (1 to 4 bytes) and UTF-16 (with surrogate pairs) are decoded incrementally; invalid sequences become the Unicode replacement character. Standard library only, no Foundation. Reimplemented from the documented UTF decoding rules; no upstream code copied. |
||
|---|---|---|
| .. | ||
| ByteDecoder.swift | ||
| EntityDecoder.swift | ||
| Event.swift | ||
| EventReader.swift | ||
| InputEncoding.swift | ||
| Limits.swift | ||
| Mark.swift | ||
| NamespaceContext.swift | ||
| ParseError.swift | ||
| Parser.swift | ||
| Reader.swift | ||
| StreamingDecoder.swift | ||