Skip to content

Releases: christophhagen/BinaryCodable

3.0.3

12 Apr 22:13
f4bdd82
Compare
Choose a tag to compare

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

12 Apr 21:53
f1bb78f
Compare
Choose a tag to compare

Improves performance during encoding, especially for very large properties.

3.0.1

08 Apr 12:57
c8314c3
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.0...3.0.1

3.0.0

03 Apr 19:13
Compare
Choose a tag to compare

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.
  1. The only known feature to be only partially supported is encodeNil(forKey:). See the Readme for details.

2.0.3

16 Jan 18:04
33643e2
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.0.2...2.0.3

2.0.2

10 Jan 21:58
5ecd636
Compare
Choose a tag to compare

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 singleValueContainer by @mrackwitz in #9

New Contributors

Full Changelog: 2.0.1...2.0.2

2.0.1

10 Nov 21:59
Compare
Choose a tag to compare

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

04 May 10:12
Compare
Choose a tag to compare

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 set by default.
  • Optionals are encoded using an additional byte to indicate a value or nil
  • The nil index set is only needed for custom implementations
  • Uses the standard EncodingError and DecodingError instead of BinaryEncodingError and BinaryDecodingError
  • Fixes encoding errors for UUID, double-optionals and custom implementations using optionals.

Throwing fix

08 Nov 19:14
Compare
Choose a tag to compare

This minor release changes the function signature of a function on BinaryFileDecoder to allow the closure to throw errors.

Streams and files

08 Nov 13:25
Compare
Choose a tag to compare

This release adds support for new features:

Streams

New BinaryStreamEncoder and BinaryStreamDecoder classes to directly encode sequences of elements into a binary stream, which can be decoded continuously as new data becomes available.

File streams

Use BinaryFileEncoder and BinaryFileDecoder to sequentially encode elements to binary files, and read them back without keeping the whole file content in memory.

Sequences of optionals

Use the prependNilIndexSetForUnkeyedContainers option to change the encoding of sequences containing optional values (arrays, sets, ...).