         }
         self.alignDecoder = LZMABitTreeDecoder(numBits: LZMAConstants.numAlignBits, &self.pointerData)
         self.posDecoders = Array(repeating: LZMAConstants.probInitValue,
-                                count: 1 + LZMAConstants.numFullDistances - LZMAConstants.endPosModelIndex)
+                                 count: 1 + LZMAConstants.numFullDistances - LZMAConstants.endPosModelIndex)
 
         // There are two types of matches so we need two decoders for them.
         self.lenDecoder = LZMALenDecoder(&self.pointerData)

        self.repLenDecoder = LZMALenDecoder(&self.pointerData)
    }

    func decodeUncompressed() -> [UInt8] {
        let dataSize = self.pointerData.alignedByte().toInt() << 8 + self.pointerData.alignedByte().toInt() + 1
        var out: [UInt8] = Array(repeating: 0, count: dataSize)
        for i in 0..<dataSize {
            let byte = pointerData.alignedByte()
            out[i] = byte
            self.put(byte)
        }
        return out
    }

    func decodeLZMA2(_ controlByte: UInt8, _ dictSize: Int) throws -> [UInt8] {
        let uncompressedSizeBits = controlByte & 0x1F
        let reset = (controlByte & 0x60) >> 5
        let unpackSize = (uncompressedSizeBits.toInt() << 16) +
            self.pointerData.alignedByte().toInt() << 8 + self.pointerData.alignedByte().toInt() + 1
        let compressedSize = self.pointerData.alignedByte().toInt() << 8 + self.pointerData.alignedByte().toInt() + 1
        var dataStartIndex = pointerData.index
        let out: [UInt8]
        switch reset {
        case 0:
            break

            throw LZMA2Error.WrongReset
        }
        var uncompressedSize = unpackSize
        let startCount = out.count
        try decodeLZMA(&uncompressedSize)
        guard unpackSize == out.count - startCount && pointerData.index - dataStartIndex == compressedSize
            else { throw LZMA2Error.WrongSizes }
    }

    func decodeLZMA(_ uncompressedSize: inout Int) throws {
        // First, we need to initialize Rande Decoder.
        guard let rD = LZMARangeDecoder(&self.pointerData) else {
            throw LZMAError.RangeDecoderInitError
        }
        self.rangeDecoder = rD

        // Main decoding cycle.
        while true {
