     }
 
     /// Returns `true` if end of archive is reached, `false` otherwise.
-    private static func processPadding(_ pointerData: DataWithPointer) throws -> Bool {
-        guard !pointerData.isAtTheEnd else { return true }
+    private static func processPadding(_ pointerData: DataWithPointer) throws {
+        guard !pointerData.isAtTheEnd
+            else { return }
 
         var paddingBytes = 0
         while true {

            guard !streamResult.checkError
                else { throw XZError.wrongCheck([result]) }

            if try processPadding(pointerData) {
                break
            }
        }

        return result

            guard !streamResult.checkError
                else { throw XZError.wrongCheck(result) }

            try processPadding(pointerData)
        }

        return result
