Releases: christophhagen/BinaryCodable
3.1.1
3.1.0: Allow multiple calls to containers (#25)
This release brings improvements to now allow the creation of multiple containers that target the same underlying storage.
See the readme section for more details.
3.0.3
This release introduces an optimization that had been missing unintentionally from the 3.0 release.
The binary format for those basic types which require no additional length information (e.g. Double, Int, etc.) are now encoded more efficiently in arrays and sets.
3.0.2
Improves performance during encoding, especially for very large properties.
3.0.1
What's Changed
- Fix crash when using wrappers with other encoders by @christophhagen in #19
Full Changelog: 3.0.0...3.0.1
3.0.0
New format
Huge update! This release changes the binary format as well as much of the implementation.
This means that the new version is not compatible with older encodings, but the new implementation is much more stable, supports more features, and is faster. And all of that with about half the lines of code!
The older binary format (still documented in LegacyFormat.md was initially developed to provide some cross-compatibility with Google Protocol Buffers. But Protobuf has a very limited feature set, and time (and lots of bugs) has shown that a fresh start was needed. The new format has been redesigned specifically for Codable, and supports all1 features, while still being almost equally efficient.
A few additional notes:
- Migration info is provided in the Readme.
- The new binary format is detailed in
BinaryFormat.md - Protobuf compatibility was dropped. This functionality will be moved to ProtobufCodable in the next few weeks.
-
The only known feature to be only partially supported is
encodeNil(forKey:). See the Readme for details. ↩
2.0.3
What's Changed
- Provide
codingPathwhen decoding fails due to corrupt data by @mrackwitz in #10 - Decoding fails for optional varlength values in a singleValueContainer nested in keyed containers by @mrackwitz in #11
- Update ci by @christophhagen in #12
- Update docs by @christophhagen in #13
Full Changelog: 2.0.2...2.0.3
2.0.2
Fixes an issue where a custom encoding logic using a single value container would fail to decode.
Thanks to @mrackwitz for the discovery and fix.
What's Changed
- Decoding fails for keyed structs in a
singleValueContainerby @mrackwitz in #9
New Contributors
- @mrackwitz made their first contribution in #9
Full Changelog: 2.0.1...2.0.2
2.0.1
This bugfix release addresses an issue where decoding would fail when custom decoding logic was implemented using variable-length types (e.g. String, Data) within an unkeyedContainer.
The bug is fixed without changes to the encoded format.
2.0.0
This release brings breaking changes to the binary format, and fixes several errors with encoding of optionals.
- Unkeyed containers no longer have a
nil index setby default. - Optionals are encoded using an additional byte to indicate a value or
nil - The
nil index setis only needed for custom implementations - Uses the standard
EncodingErrorandDecodingErrorinstead ofBinaryEncodingErrorandBinaryDecodingError - Fixes encoding errors for UUID, double-optionals and custom implementations using optionals.