 
 class DataWithPointer {
 
-    private let bitOrder: BitOrder
+    let bitOrder: BitOrder
     private let bitArray: [UInt8]
     var index: Int = 0
     private(set) var bitMask: UInt8
 
-    init(data: Data, bitOrder: BitOrder) {
+    init(array: inout [UInt8], bitOrder: BitOrder) {
         self.bitOrder = bitOrder
-        self.bitArray = data.toArray(type: UInt8.self)
+        self.bitArray = array
 
         switch self.bitOrder {
         case .reversed:

        case .straight:
            self.bitMask = 128
        }
    }

    func bits(count: Int) -> [UInt8] {

        return result
    }

    func uint64FromAlignedBytes(count: UInt64) -> UInt64 {
        self.skipUntilNextByte()
        var result: UInt64 = 0
        for i: UInt64 in 0..<count {
            result |= UInt64(self.bitArray[self.index]) << (8 * i)
            self.index += 1
        }
        return result
    }

    // MARK: Manipulations with index and bitShift

    func skipUntilNextByte() {
