All notable changes to CSVCoder will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Full support for ASCII-compatible encodings (ISO-8859-1, Windows-1252, macOS Roman)
- Automatic transcoding for non-ASCII encodings (UTF-16, UTF-16LE/BE, UTF-32)
- BOM (Byte Order Mark) detection for UTF-8, UTF-16, and UTF-32
- Zero-copy parsing preserved for ASCII-compatible encodings
CSVUtilities.isASCIICompatible(_:)for encoding classificationCSVUtilities.transcodeToUTF8(_:from:)for encoding conversionCSVUtilities.detectBOM(in:)for multi-format BOM detection
CSVDecoder.decode(_:from: URL)- Stream decode from files with O(1) memoryCSVDecoder.decode(_:from: Data)- Stream decode from DataMemoryMappedReader- Zero-copy file access via mmapStreamingCSVParser- AsyncSequence-based row parser with UTF-8 byte parsing- Automatic UTF-8 BOM detection and handling
decodeParallel(_:from:parallelConfig:)- Multi-core CSV decodingdecodeParallelBatched(_:from:parallelConfig:)- Streaming parallel batchesParallelConfiguration- Control parallelism, chunk size, orderingSIMDScanner- 64-byte SIMD vector scanning (~8x faster delimiter detection)
decodeWithBackpressure(_:from:memoryConfig:)- Memory-limited streamingdecodeBatchedWithBackpressure(_:from:memoryConfig:)- Batched output with limitsdecodeWithProgress(_:from:progressHandler:)- Progress reporting during decodeMemoryLimitConfiguration- Configure memory budget and water marks
KeyDecodingStrategy.convertFromSnakeCase-first_name→firstNameKeyDecodingStrategy.convertFromKebabCase-first-name→firstNameKeyDecodingStrategy.convertFromScreamingSnakeCase-FIRST_NAME→firstNameKeyDecodingStrategy.convertFromPascalCase-FirstName→firstNameKeyDecodingStrategy.custom- Custom transformation closure
columnMapping: [String: String]- Explicit header-to-property mappingindexMapping: [Int: String]- Decode headerless CSV by column index
DateDecodingStrategy.flexible- Auto-detect from 20+ date formatsDateDecodingStrategy.flexibleWithHint- Try preferred format firstNumberDecodingStrategy.flexible- Parse US/EU formats, strip currencyNumberDecodingStrategy.locale- Use specific locale for parsingBoolDecodingStrategy.flexible- International boolean values (oui/non, ja/nein, etc.)BoolDecodingStrategy.custom- Custom true/false value sets
CSVLocation- Row, column, and coding path information- Enhanced
CSVDecodingErrorwith location-aware variants - Detailed error messages with row/column context
- DocC documentation catalog with articles
- Getting Started guide
- Streaming Decoding article
- Parallel Decoding article
CSVParserrewritten for robust RFC 4180 compliance- Improved CRLF handling with explicit Unicode scalar comparisons
- Parser now handles all line ending styles: LF, CRLF, lone CR
- Unterminated quote detection with line/column information
- Quoted fields containing CRLF now parse correctly
- Empty quoted fields handled properly
trimWhitespaceconfiguration now consistently applied to all field types- Previously, numeric fields (Int, Double, etc.) would fail parsing with whitespace
- Boolean decoding now respects configuration instead of always trimming
- Header extraction now applies trimWhitespace consistently across all decode paths
- Flexible decoding strategies for dates, numbers, and booleans
nonisolatedannotations for Swift 6.2 Approachable Concurrency compatibility
- Initial release
CSVEncoderwith configurable delimiters, date strategies, nil handlingCSVDecoderwith header parsing and type-safe decoding- Support for
Decimal,UUID,URLtypes - RFC 4180-compliant field quoting and escaping
- Swift 6 strict concurrency with
Sendableconformance - Platform support: iOS 18+, macOS 15+, watchOS 11+, tvOS 18+, visionOS 2+