Skip to content

Releases: tsolomko/BitByteData

2.0.4

20 Apr 13:41
2.0.4
cdcdc51
Compare
Choose a tag to compare
  • Swift 5.2 is no longer supported.
  • Added visionOS as a possible deployment target (probably, will only work for Carthage users). (Thanks to @Dukandar for the suggestion!)
  • Added PrivacyInfo.xcprivacy file.

Comment: BitByteData does not collect and obviously does not send any data anywhere, so the file is essentially empty and was added just to prevent potential problems with Apple bureaucracy for the framework users.

2.0.3

15 Jun 09:51
2.0.3
36df26f
Compare
Choose a tag to compare
  • There are now minimum deployment targets specified in the Swift Package Manager manifest (#5). They match the ones used for CocoaPods spec and in the Xcode project.

2.0.2

24 Sep 12:19
2.0.2
b4b4161
Compare
Choose a tag to compare
  • Swift 5.0 and 5.1 are no longer supported.
  • Increased minimum deployment versions for Darwin platforms: macOS from 10.10 to 10.13, iOS from 9.0 to 11.0, tvOS from 9.0 to 11.0, and watchOS from 2.0 to 4.0.

Comment: This change should improve support of modern Xcode versions (e.g. Xcode 14).

2.0.1

04 Aug 07:37
2.0.1
c119e12
Compare
Choose a tag to compare
  • Added an explicit precondition on bitsCount argument in the default implementation of the
    BitWriter.write(signedNumber:bitsCount:representation:) function.

Comment: This check was still present later in the implementation, but now it happens earlier and it is more explicit and documented.

  • Added missing documentation about a precondition in the write(unsignedNumber:bitsCount:) function of the LsbBitWriter and MsbBitWriter functions.

2.0.0

03 Aug 13:39
2.0.0
c29fc3b
Compare
Choose a tag to compare

In this release the API design of BitByteData has been reworked. Additionally, new functionality for correctly dealing with signed integers and their bit representations has been added. You may find a new Migration to 2.0 section in the README which should be helpful in adopting the new changes. You may also refer to the API Design document for some additional context and reasoning behind the changes.

Byte Reading

  • ByteReader class has been renamed to LittleEndianByteReader.
  • LittleEndianByteReader (ex-ByteReader) is now a final class.
    • LsbBitReader and MsbBitReader are no longer its subclasses.
  • Added a new BigEndianByteReader class with the same set of APIs as LittleEndianByteReader.
  • Added a ByteReader protocol which inherits AnyObject.
    • Most of the methods and properties of the previously existing ByteReader class are now requirements of the new protocol.
    • ByteReader provides default implementations for the initializer, which performs conversion from a BitReader, and for the bytesLeft, bytesRead, and isFinished properties (all of these are not protocol requirements).
    • In addition, ByteReader provides a default implementation for the int(fromBytes:) method.
    • Both LittleEndianByteReader and BigEndianByteReader now conform to the ByteReader protocol.

Bit Reading

  • Added a SignedNumberRepresentation enum with five cases and two instance methods.
  • The BitReader protocol now inherits the ByteReader protocol.
    • Two new method requirements have been added to the BitReader protocol: signedInt(fromBits:representation:) and advance(by:).
    • BitReader now provides a default implementation for int(fromBits:).
  • It is no longer possible to set the offset property of the LsbBitReader and MsbBitReader classes if they are not aligned (a precondition crash occurs instead).
  • The signedInt(fromBits:representation:) function has been added to the LsbBitReader and MsbBitReader classes with the default value of SignedNumberRepresentation.twoComplementNegatives for the representation argument.

Bit Writing

  • Two new method requirements have been added to the BitWriter protocol: write(unsignedNumber:bitsCount:) and write(signedNumber:bitsCount:representation:).
  • BitWriter now provides default implementations for write(signedNumber:bitsCount:representation:) and write(number:bitsCount:).
    • The default implementation of the write(number:bitsCount:) function now has a precondition crash if the bitsCount argument exceeds the bit width of the integer type on the current platform.
  • The write(unsignedNumber:bitsCount:) function of the LsbBitWriter and MsbBitWriter classes now has a precondition crash if the bitsCount argument exceeds the bit width of the integer type on the current platform.

General

  • Swift 4.2 is no longer supported. For reference, the following platforms and Swift versions are supported at the time of this release:
    • Apple platforms: Swift 5.0+
    • Linux: Swift 5.0+
    • Windows: Swift 5.4+
  • Minimum iOS deployment version (when installed via CocoaPods or Carthage) is now 9.0.
  • Documentation has been updated.
    • Added documentation for new APIs.
    • A couple of missing precondition checks are now properly documented.
    • Existing documentation has been made more concise and slightly more grammatically correct.

2.0.0 Test 2

28 Jul 07:53
2.0.0-test.2
b68fed3
Compare
Choose a tag to compare
2.0.0 Test 2 Pre-release
Pre-release

In the second test release of 2.0.0 the documentation has been updated, so now all new APIs are documented.

2.0.0 Test 1

17 Jul 12:35
2.0.0-test.1
c51d6d9
Compare
Choose a tag to compare
2.0.0 Test 1 Pre-release
Pre-release

This is a first test release of the upcoming major update, 2.0.0. It includes probably all of the planned functional and API changes. The documentation, though, is extremely outdated, and will be updated for the second test release.

1.4.4

20 May 10:22
1.4.4
0969ebf
Compare
Choose a tag to compare
  • Fixed a compilation warning about "deprecated class keyword" appearing when using Swift 5.4.

1.4.3

09 Apr 10:03
1.4.3
3ee55b1
Compare
Choose a tag to compare
  • Fixed an issue where Swift Package Manager from Swift 4.2 was unable to add BitByteData as a package dependency.

Comment: At the moment BitByteData supports Swift 4.2 (only via CocoaPods and SPM) and Swift 5.X.

1.4.2

19 Mar 20:46
1.4.2
6cf2bc4
Compare
Choose a tag to compare
  • Improved compatibility with Swift 5.X and Xcode newer than 10.1 (including Xcode 11).