Add a mark call to zlib_decoder.decode.

This commit is contained in:
Nigel Tao committed 2017-10-26 12:34:01 +11:00
1 parent 474a0d2ed7
commit 0d32b6cb47
2 files changed
+2

No files matched your search

+1
View File
@@ -2422,6 +2422,7 @@ puffs_flate__status puffs_flate__zlib_decoder__decode(
}
v_checksum = 0;
while (true) {
puffs_base__writer1__mark(&a_dst, b_wptr_dst);
PUFFS_BASE__COROUTINE_SUSPENSION_POINT(3);
if (a_dst.buf) {
size_t n = b_wptr_dst - (a_dst.buf->ptr + a_dst.buf->wi);
+1
View File
@@ -46,6 +46,7 @@ pub func zlib_decoder.decode?(dst writer1, src reader1)() {
}
var checksum u32
while true {
in.dst.mark()
var z status = try this.flate.decode?(dst:in.dst, src:in.src)
// TODO: expose some API to opt out of checksumming, trading off error
// detection for throughput.