mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 00:47:28 +01:00
Prepare for calculating the zlib checksum.
This commit is contained in:
1 parent
4d7faac49e
commit
62935c41d7
7 files changed
+89
-42
No files matched your search
@@ -37,7 +37,14 @@ pub func zlib_decoder.decode?(dst writer1, src reader1)() {
|
||||
if (x % 31) != 0 {
|
||||
return error "invalid zlib parity check"
|
||||
}
|
||||
this.dec.decode?(dst:in.dst, src:in.src)
|
||||
while true {
|
||||
var z status = try this.dec.decode?(dst:in.dst, src:in.src)
|
||||
// TODO: calculate the checksum.
|
||||
if z.is_ok() {
|
||||
break
|
||||
}
|
||||
return z
|
||||
}
|
||||
var checksum u32 = in.src.read_u32be?()
|
||||
// TODO: verify the checksum.
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user