11# Changelog
22
3+ ## 2.0.1
4+
5+ - Added an explicit precondition on ` bitsCount ` argument in the default implementation of the
6+ ` BitWriter.write(signedNumber:bitsCount:representation:) ` function.
7+ - Added missing documentation about a precondition in ` L/MsbBitWriter.write(unsignedNumber:bitsCount:) ` .
8+
39## 2.0.0
410
511- Swift 4.2 is no longer supported.
1117- Added a ` ByteReader ` protocol which inherits ` AnyObject ` .
1218 - Most of the methods and properties of the previously existing ` ByteReader ` _ class_ are now requirements of the new
1319 protocol.
14- - ` ByteReader ` provides a default implementation for the initializer which implements conversion from a ` BitReader `
15- (this initializer is not a protocol requirement).
16- - ` ByteReader ` provides default implementations for the ` bytesLeft ` , ` bytesRead ` , and ` isFinished ` properties (these
17- properties are not protocol requirements).
20+ - ` ByteReader ` provides default implementations for the initializer, which implements conversion from a ` BitReader ` ,
21+ and for the ` bytesLeft ` , ` bytesRead ` , and ` isFinished ` properties (all of these are not protocol requirements).
1822 - ` ByteReader ` provides a default implementation for the ` int(fromBytes:) ` method.
1923 - Both ` LittleEndianByteReader ` and ` BigEndianByteReader ` now conform to the ` ByteReader ` protocol.
2024- Added a ` SignedNumberRepresentation ` enum with five cases and two instance methods.
@@ -30,9 +34,9 @@ with the default value of `SignedNumberRepresentation.twoComplementNegatives` fo
3034` write(signedNumber:bitsCount:representation:) ` .
3135- ` BitWriter ` now provides default implementations for ` write(signedNumber:bitsCount:representation:) ` and
3236` write(number:bitsCount:) ` .
33- - The default implementation of the ` write(number:bitsCount:) ` function has a precondition crash if the ` bitsCount `
37+ - The default implementation of the ` write(number:bitsCount:) ` function now has a precondition crash if the ` bitsCount `
3438 argument exceeds the bit width of the integer type on the current platform.
35- - The ` write(unsignedNumber:bitsCount:) ` function of the ` LsbBitWriter ` and ` MsbBitWriter ` classes functions now have a
39+ - The ` write(unsignedNumber:bitsCount:) ` function of the ` LsbBitWriter ` and ` MsbBitWriter ` classes now has a
3640precondition crash if the ` bitsCount ` argument exceeds the bit width of the integer type on the current platform.
3741- Documentation has been updated.
3842 - Added documentation for new APIs.
0 commit comments