mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
std.compress.zstandard: add DictionaryIdFlagUnsupported ZstandardStream.Error
This commit is contained in:
parent
1a862175d5
commit
2766b704c1
@ -31,6 +31,7 @@ pub fn ZstandardStream(
|
||||
|
||||
pub const Error = ReaderType.Error || error{
|
||||
ChecksumFailure,
|
||||
DictionaryIdFlagUnsupported,
|
||||
MalformedBlock,
|
||||
MalformedFrame,
|
||||
OutOfMemory,
|
||||
@ -144,6 +145,7 @@ pub fn ZstandardStream(
|
||||
while (self.state == .NewFrame) {
|
||||
const initial_count = self.source.bytes_read;
|
||||
self.frameInit() catch |err| switch (err) {
|
||||
error.DictionaryIdFlagUnsupported => return error.DictionaryIdFlagUnsupported,
|
||||
error.EndOfStream => return if (self.source.bytes_read == initial_count)
|
||||
0
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user