             guard !streamResult.checkError
                 else { throw XZError.wrongCheck([result]) }
 
-            if try processPadding(pointerData) {
-                break
-            }
+            try processPadding(pointerData)
         }
 
         return result

                if byte != 0 || paddingBytes % 4 != 3 {
                    throw XZError.wrongPadding
                } else {
                    return true
                }
            }
            paddingBytes += 1
        }
        pointerData.index -= 1
        return false
    }

}

    }

    /// Returns `true` if end of archive is reached, `false` otherwise.
    private static func processPadding(_ pointerData: DataWithPointer) throws {
        guard !pointerData.isAtTheEnd
            else { return }

        var paddingBytes = 0
        while true {
