mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
std.compress.flate.Decompress: hashing is out of scope
This API provides the data; applications can verify their own checksums.
This commit is contained in:
parent
f3a38e30fa
commit
5f790464b0
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user