         case .straight:
             self.bitMask = 128
         }
+    }
+
+    convenience init(data: Data, bitOrder: BitOrder) {
+        var array = data.toArray(type: UInt8.self)
+        self.init(array: &array, bitOrder: bitOrder)
     }
 
     func bits(count: Int) -> [UInt8] {

        return result
    }

    // MARK: Manipulations with index and bitShift

    func skipUntilNextByte() {


class DataWithPointer {

    let bitOrder: BitOrder
    private let bitArray: [UInt8]
    var index: Int = 0
    private(set) var bitMask: UInt8

    init(array: inout [UInt8], bitOrder: BitOrder) {
        self.bitOrder = bitOrder
        self.bitArray = array

        switch self.bitOrder {
        case .reversed:
