 
         let blockFlags = pointerData.alignedByte()
         blockBytes.append(blockFlags)
-        let numberOfFilters = blockFlags & 0x03
+        /**
+         Bit values 00, 01, 10, 11 indicate filters number from 1 to 4,
+         so we actually need to add 1 to get filters' number.
+         */
+        let numberOfFilters = blockFlags & 0x03 + 1
         guard blockFlags & 0x3C == 0
             else { throw XZError.WrongBlockFlags }
 

        return StreamHeader(checkType: checkType, flagsCRC: flagsCRC)
    }

    private static func processBlock(_ pointerData: inout DataWithPointer) throws {
        var blockBytes: [UInt8] = []
        let blockHeaderStartIndex = pointerData.index
        let blockHeaderSize = pointerData.alignedByte()
        blockBytes.append(blockHeaderSize)
        guard blockHeaderSize >= 0x01 && blockHeaderSize <= 0xFF
            else { throw XZError.WrongBlockHeaderSize }


        let streamHeader = try processStreamHeader(&pointerData)

        // BLOCKS AND INDEX
        /// Zero value of blockHeaderSize means that we encountered INDEX.
        let blockHeaderSize = pointerData.alignedByte()
        if blockHeaderSize == 0 {
            try processIndex(&pointerData)
        } else {
            try processBlock(blockHeaderSize, &pointerData)
        }


        // STREAM FOOTER (Should be after parsing blocks).
        try processFooter(streamHeader, &pointerData)
