         return (checkType, flagsCRC)
     }
 
-    private static func processBlock(_ blockHeaderSize: UInt8,
+    private static func processBlock(_ blockHeaderSize: Int,
                                      _ pointerData: DataWithPointer) throws -> (blockData: [UInt8], unpaddedSize: Int, uncompressedSize: Int) {
-        var blockBytes: [UInt8] = []
         let blockHeaderStartIndex = pointerData.index - 1
-        blockBytes.append(blockHeaderSize)
         guard blockHeaderSize >= 0x01 && blockHeaderSize <= 0xFF
             else { throw XZError.wrongFieldValue }
         let realBlockHeaderSize = (blockHeaderSize + 1) * 4
 
         let blockFlags = pointerData.byte()
-        blockBytes.append(blockFlags)
         /**
          Bit values 00, 01, 10, 11 indicate filters number from 1 to 4,
          so we actually need to add 1 to get filters' number.

            else { throw XZError.fieldReservedValue }

        // Four bits of second flags byte indicate type of redundancy check.
        let checkType = flagsBytes[1] & 0x0F
        switch checkType {
        case 0x00, 0x01, 0x04, 0x0A:
            break


fileprivate extension DataWithPointer {

    fileprivate func multiByteDecode() throws -> Int {
        var i = 1
        var result = self.byte().toInt()
        if result <= 127 {
            return result
        }
        result &= 0x7F
        while self.previousByte & 0x80 != 0 {
