         return result
     }
 
-    private static func processStream(_ pointerData: DataWithPointer) throws -> Data {
+    private static func processStream(_ pointerData: DataWithPointer) throws -> (data: Data, checkError: Bool) {
         var out = Data()
 
         let streamHeader = try XZStreamHeader(pointerData)


        var result = Data()
        streamLoop: while !pointerData.isAtTheEnd {
            result.append(try processStream(pointerData))

            guard !pointerData.isAtTheEnd else { break streamLoop }


        // STREAM FOOTER
        try processFooter(streamHeader, indexSize, pointerData)

        return (out, false)
    }

    private static func processIndex(_ blockInfos: [(unpaddedSize: Int, uncompSize: Int)],
