- Swift 5.2 is no longer supported.
- Enable visionOS deployment target (except for SPM).
- Add PrivacyInfo file.
- There are now minimum deployment targets specified in Swift Package Manager manifest.
- Swift 5.0 and 5.1 are no longer supported.
- Increased minimum deployment versions (when installed via CocoaPods or Carthage) 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.
- Added an explicit precondition on
bitsCountargument in the default implementation of theBitWriter.write(signedNumber:bitsCount:representation:)function. - Added missing documentation about a precondition in
L/MsbBitWriter.write(unsignedNumber:bitsCount:).
- Swift 4.2 is no longer supported.
- Minimum iOS deployment version (when installed via CocoaPods or Carthage) is now 9.0.
- Renamed the
ByteReaderclass toLittleEndianByteReader. LittleEndianByteReader(ex-ByteReader) is now a final class.LsbBitReaderandMsbBitReaderare no longer its subclasses.
- Added a new
BigEndianByteReaderclass with the same set of APIs asLittleEndianByteReader. - Added a
ByteReaderprotocol which inheritsAnyObject.- Most of the methods and properties of the previously existing
ByteReaderclass are now requirements of the new protocol. ByteReaderprovides default implementations for the initializer, which implements conversion from aBitReader, and for thebytesLeft,bytesRead, andisFinishedproperties (all of these are not protocol requirements).ByteReaderprovides a default implementation for theint(fromBytes:)method.- Both
LittleEndianByteReaderandBigEndianByteReadernow conform to theByteReaderprotocol.
- Most of the methods and properties of the previously existing
- Added a
SignedNumberRepresentationenum with five cases and two instance methods. - The
BitReaderprotocol now inherits theByteReaderprotocol.- Two new method requirements have been added to the
BitReaderprotocol:signedInt(fromBits:representation:)andadvance(by:). BitReadernow provides a default implementation forint(fromBits:).
- Two new method requirements have been added to the
- It is no longer possible to set the
offsetproperty of theLsbBitReaderandMsbBitReaderclasses if they are not aligned (a precondition crash occurs instead). - The
signedInt(fromBits:representation:)function has been added to theLsbBitReaderandMsbBitReaderclasses with the default value ofSignedNumberRepresentation.twoComplementNegativesfor therepresentationargument. - Two new method requirements have been added to the
BitWriterprotocol:write(unsignedNumber:bitsCount:)andwrite(signedNumber:bitsCount:representation:). BitWriternow provides default implementations forwrite(signedNumber:bitsCount:representation:)andwrite(number:bitsCount:).- The default implementation of the
write(number:bitsCount:)function now has a precondition crash if thebitsCountargument exceeds the bit width of the integer type on the current platform.
- The default implementation of the
- The
write(unsignedNumber:bitsCount:)function of theLsbBitWriterandMsbBitWriterclasses now has a precondition crash if thebitsCountargument exceeds the bit width of the integer type on the current platform. - 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.
- Fixed a compilation warning about "deprecated class keyword" appearing when using Swift 5.4.
- Fixed incompatibility with Swift Package Manager from Swift 4.2.
- Improved compatibility with the latest versions of Swift (5.x) and Xcode.
- Reverted performance improvements of 1.4.0 update due to their incompatibility with Swift 5.0.
- Significantly improved performance of
ByteReader,LsbBitReaderandMsbBitReader.
- Improved performance of
ByteReader's functions and properties when compiled with Swift 4.2 compiler.
- Updated to support Swift 4.2.
- Added
advance(by:)function to bothLsbBitReaderandMsbBitReader. - Added
write(unsignedNumber:bitsCount:)function to bothLsbBitWriterandMsbBitWriter(PR #1 by @cowgp).
- Updated to support Swift 4.1.
- Added
bytesLeftandbytesReadcomputed properties toByteReader. - Added
int(fromBytes:),uint16(fromBytes:),uint32(fromBytes:), anduint64(fromBytes:)functions to all readers. - Added
byte(fromBits:),uint16(fromBits:),uint32(fromBits:), anduint64(fromBits:)functions toLsbBitReaderandMsbBitReader, as well asBitReaderprotocol. int(fromBits:)function now has a precondition that its argument doesn't exceedIntbit width.- Reverted "disable symbol stripping" change from 1.1.1 update, since underlying problem in Carthage was fixed.
- Minor updates to documentation.
- Added missing documentation for
bitsLeftandbitsReadcomputed properties. - Disabled symbol stripping in archives generated by Carthage and published on GitHub Releases.
- Added converting from
ByteReaderinitializers toLsbBitReaderandMsbBitReader, as well asBitReaderprotocol. - Added
bitsLeftandbitsReadcomputed properties toLsbBitReaderandMsbBitReader, as well asBitReaderprotocol.
- Fixed several problems causing incorrect preconditions failures.
- Improved performance of
bit(),bits(count:)andint(fromBits:)functions for bothLsbBitReaderandMsbBitReader. - More consistent behaviour (precondition failures) for situtations when there is not enough data left.
- Small updates to documentation.
ByteReaderclass for reading bytes.BitReaderprotocol,LsbBitReaderandMsbBitReaderclasses for reading bits (and bytes).BitWriterprotocol,LsbBitWriterandMsbBitWriterclasses for writing bits (and bytes).