 
         guard let files = header.fileInfo?.files
             else { return [] }
+
+        var nonEmptyFileIndex = 0
 
         /// Index of currently opened folder in `streamInfo.coderInfo.folders`.
         var folderIndex = 0

            let data: Data?

            if !file.isEmptyStream {
                // TODO: Does empty files need all this?

                // Without `SevenZipStreamInfo` and `SevenZipPackInfo` objects,
                //  we cannot find file data location in container.
                guard let streamInfo = header.mainStreams


                // File's unpack size is required to proceed. 
                // Next check ensures that we don't `unpackSizes` array's boundaries.
                guard nonEmptyFileIndex < substreamInfo.unpackSizes.count
                    else { throw SevenZipError.noFileSize }

                let fileSize = substreamInfo.unpackSizes[nonEmptyFileIndex]
                let fileData = Data(bytes: rawFileData.bytes(count: fileSize))

                let calculatedFileCRC = CheckSums.crc32(fileData)
                if nonEmptyFileIndex < substreamInfo.digests.count {
                    guard calculatedFileCRC == substreamInfo.digests[nonEmptyFileIndex]
                        else { throw SevenZipError.wrongCRC }
                }

