christophhagen / BinaryCodable

A binary encoder for Swift Codable types
MIT License
92 stars 7 forks source link

New format #15

Closed christophhagen closed 6 months ago

christophhagen commented 6 months ago

This PR adds a new binary format and backing implementation for the next major release.

The code is less complex, and contains fewer edge cases.

The new format is a bit less efficient in some cases, but supports all features of the codable protocol, including providing the number of elements in unkeyed containers.

The new format also fixes the compatibility with SIMD types (#14).

The new binary format is detailed in the BinaryFormat.md document.

Migration options from the previous format are stated in the readme, including a new readme to import a swift package that can decode the old format.