v0.11.0
Three new models. Minus a model and a method. Plus CocoaPods?
GitHub (v0.10.0...v0.11.0)
- #77 Use
0
rather thanInt.zero
- #74 An endianness abstraction
- #75 No
uninitialized(_:)
- #73 A chunked integer sequence
- #72 Endianness sensitive collection
v2
- #52 CocoaPods support (feat. ypopovych)
New in NBKCoreKit
+ enum NBKEndianness
+ struct NBKTwinHeaded<Base>
+ struct NBKChunkedInt<Base, Element>
- struct NBKLittleEndianOrdered<Base>
Reforge integers like a level 100 blacksmith.
for uint32 in NBKChunkedInt(source, isSigned: false, count: nil, as: UInt32.self) { ... }
[1, 2, 3, 4] == Array(NBKChunkedInt(([0x0201, 0x0403] as [Int16]), as: UInt8.self))
[2, 1, 4, 3] == Array(NBKChunkedInt(([0x0201, 0x0403] as [Int16]).reversed(), as: UInt8.self).reversed())
[3, 4, 1, 2] == Array(NBKChunkedInt(([0x0201, 0x0403] as [Int16]).reversed(), as: UInt8.self))
[4, 3, 2, 1] == Array(NBKChunkedInt(([0x0201, 0x0403] as [Int16]), as: UInt8.self).reversed())
[0x0201, 0x0403] == Array(NBKChunkedInt(([1, 2, 3, 4] as [UInt8]), as: Int16.self))
[0x0102, 0x0304] == Array(NBKChunkedInt(([1, 2, 3, 4] as [UInt8]).reversed(), as: Int16.self).reversed())
[0x0403, 0x0201] == Array(NBKChunkedInt(([1, 2, 3, 4] as [UInt8]), as: Int16.self).reversed())
[0x0304, 0x0102] == Array(NBKChunkedInt(([1, 2, 3, 4] as [UInt8]).reversed(), as: Int16.self))
Or flex on your friends with dynamic directions.
NBKTwinHeaded(elements, reversed: Bool.random())
New in NBKDoubleWidthKit
- NBKDoubleWidth.uninitialized(_:)