From 5f790464b0d5da3c4c1a7252643e7cdd4c4b605e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 29 Jul 2025 11:48:54 -0700 Subject: [PATCH] std.compress.flate.Decompress: hashing is out of scope This API provides the data; applications can verify their own checksums. --- lib/std/compress/flate/Decompress.zig | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/std/compress/flate/Decompress.zig b/lib/std/compress/flate/Decompress.zig index 104be1c886..972cc8f294 100644 --- a/lib/std/compress/flate/Decompress.zig +++ b/lib/std/compress/flate/Decompress.zig @@ -1096,26 +1096,12 @@ test "gzip header" { 0x00, 0x03, }, error.BadGzipHeader); - // Wrong checksum - try testFailure(.gzip, &[_]u8{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, - }, error.WrongGzipChecksum); - // Truncated checksum try testFailure(.gzip, &[_]u8{ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, }, error.EndOfStream); - // Wrong initial size - try testFailure(.gzip, &[_]u8{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - }, error.WrongGzipSize); - // Truncated initial size field try testFailure(.gzip, &[_]u8{ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,