         return Data(bytes: out)
     }
 
-    private static func processStreamHeader(_ pointerData: inout DataWithPointer) throws -> StreamHeader {
+    private static func processStreamHeader(_ pointerData: inout DataWithPointer) throws -> (checkType: Int, flagsCRC: Int) {
         // Check magic number.
         guard pointerData.intFromAlignedBytes(count: 6) == 0x005A587A37FD
             else { throw XZError.WrongMagic }

            else { throw XZError.WrongIndexCRC }
    }

    private static func processFooter(_ streamHeader: StreamHeader,
                                      _ pointerData: inout DataWithPointer) throws {
        let footerCRC = pointerData.intFromAlignedBytes(count: 4)
        let storedBackwardSize = pointerData.alignedBytes(count: 4)

        guard CheckSums.crc32([0, checkType.toUInt8()]) == flagsCRC
            else { throw XZError.WrongFlagsCRC }

        return (checkType, flagsCRC)
    }

    private static func processBlock(_ blockHeaderSize: UInt8,
