authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-29 11:48:54-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-31 22:10:11-07:00
log5f790464b0d5da3c4c1a7252643e7cdd4c4b605e
tree1f4c8d21b33d6c1981653094d767535191703493
parentf3a38e30faae2bfd9066dd187e9b4e9f914c46d6

std.compress.flate.Decompress: hashing is out of scope

This API provides the data; applications can verify their own checksums.

1 files changed, 0 insertions(+), 14 deletions(-)

lib/std/compress/flate/Decompress.zig-14
...@@ -1096,26 +1096,12 @@ test "gzip header" {...@@ -1096,26 +1096,12 @@ test "gzip header" {
1096 0x00, 0x03,1096 0x00, 0x03,
1097 }, error.BadGzipHeader);1097 }, error.BadGzipHeader);
10981098
1099 // Wrong checksum
1100 try testFailure(.gzip, &[_]u8{
1101 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1102 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01,
1103 0x00, 0x00, 0x00, 0x00,
1104 }, error.WrongGzipChecksum);
1105
1106 // Truncated checksum1099 // Truncated checksum
1107 try testFailure(.gzip, &[_]u8{1100 try testFailure(.gzip, &[_]u8{
1108 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,1101 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1109 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,1102 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,
1110 }, error.EndOfStream);1103 }, error.EndOfStream);
11111104
1112 // Wrong initial size
1113 try testFailure(.gzip, &[_]u8{
1114 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1115 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
1116 0x00, 0x00, 0x00, 0x01,
1117 }, error.WrongGzipSize);
1118
1119 // Truncated initial size field1105 // Truncated initial size field
1120 try testFailure(.gzip, &[_]u8{1106 try testFailure(.gzip, &[_]u8{
1121 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,1107 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,