authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-02-14 22:17:05+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-02-20 09:09:06+11:00
log2766b704c1805f7b3dce25331c209441cdb774fc
tree80c78d11d35712a8b7f425adebac5bcd91f93ad9
parent1a862175d52eb35efd7ecb368c1806b4ac1e7886

std.compress.zstandard: add DictionaryIdFlagUnsupported ZstandardStream.Error


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

lib/std/compress/zstandard.zig+2
...@@ -31,6 +31,7 @@ pub fn ZstandardStream(...@@ -31,6 +31,7 @@ pub fn ZstandardStream(
3131
32 pub const Error = ReaderType.Error || error{32 pub const Error = ReaderType.Error || error{
33 ChecksumFailure,33 ChecksumFailure,
34 DictionaryIdFlagUnsupported,
34 MalformedBlock,35 MalformedBlock,
35 MalformedFrame,36 MalformedFrame,
36 OutOfMemory,37 OutOfMemory,
...@@ -144,6 +145,7 @@ pub fn ZstandardStream(...@@ -144,6 +145,7 @@ pub fn ZstandardStream(
144 while (self.state == .NewFrame) {145 while (self.state == .NewFrame) {
145 const initial_count = self.source.bytes_read;146 const initial_count = self.source.bytes_read;
146 self.frameInit() catch |err| switch (err) {147 self.frameInit() catch |err| switch (err) {
148 error.DictionaryIdFlagUnsupported => return error.DictionaryIdFlagUnsupported,
147 error.EndOfStream => return if (self.source.bytes_read == initial_count)149 error.EndOfStream => return if (self.source.bytes_read == initial_count)
148 0150 0
149 else151 else