|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 2.0.0 |
| 4 | + |
| 5 | +- Swift 4.2 is no longer supported. |
| 6 | +- Minimum iOS deployment version (when installed via CocoaPods or Carthage) is now 9.0. |
| 7 | +- Renamed the `ByteReader` class to `LittleEndianByteReader`. |
| 8 | +- `LittleEndianByteReader` (ex-`ByteReader`) is now a final class. |
| 9 | + - `LsbBitReader` and `MsbBitReader` are no longer its subclasses. |
| 10 | +- Added a new `BigEndianByteReader` class with the same set of APIs as `LittleEndianByteReader`. |
| 11 | +- Added a `ByteReader` protocol which inherits `AnyObject`. |
| 12 | + - Most of the methods and properties of the previously existing `ByteReader` _class_ are now requirements of the new |
| 13 | + 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). |
| 18 | + - `ByteReader` provides a default implementation for the `int(fromBytes:)` method. |
| 19 | + - Both `LittleEndianByteReader` and `BigEndianByteReader` now conform to the `ByteReader` protocol. |
| 20 | +- Added a `SignedNumberRepresentation` enum with five cases and two instance methods. |
| 21 | +- The `BitReader` protocol now inherits the `ByteReader` protocol. |
| 22 | + - Two new method requirements have been added to the `BitReader` protocol: `signedInt(fromBits:representation:)` and |
| 23 | + `advance(by:)`. |
| 24 | + - `BitReader` now provides a default implementation for `int(fromBits:)`. |
| 25 | +- It is no longer possible to set the `offset` property of the `LsbBitReader` and `MsbBitReader` classes if they are not |
| 26 | +aligned (a precondition crash occurs instead). |
| 27 | +- The `signedInt(fromBits:representation:)` function has been added to the `LsbBitReader` and `MsbBitReader` classes |
| 28 | +with the default value of `SignedNumberRepresentation.twoComplementNegatives` for the `representation` argument. |
| 29 | +- Two new method requirements have been added to the `BitWriter` protocol: `write(unsignedNumber:bitsCount:)` and |
| 30 | +`write(signedNumber:bitsCount:representation:)`. |
| 31 | +- `BitWriter` now provides default implementations for `write(signedNumber:bitsCount:representation:)` and |
| 32 | +`write(number:bitsCount:)`. |
| 33 | + - The default implementation of the `write(number:bitsCount:)` function has a precondition crash if the `bitsCount` |
| 34 | + 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 |
| 36 | +precondition crash if the `bitsCount` argument exceeds the bit width of the integer type on the current platform. |
| 37 | +- Documentation has been updated. |
| 38 | + - Added documentation for new APIs. |
| 39 | + - A couple of missing precondition checks are now properly documented. |
| 40 | + - Existing documentation has been made more concise and slightly more grammatically correct. |
| 41 | + |
| 42 | +## 1.4.4 |
| 43 | + |
| 44 | +- Fixed a compilation warning about "deprecated class keyword" appearing when using Swift 5.4. |
| 45 | + |
3 | 46 | ## 1.4.3 |
4 | 47 |
|
5 | 48 | - Fixed incompatibility with Swift Package Manager from Swift 4.2. |
|
0 commit comments