base: rename history_retain_length

It was renamed to dst_history_retain_length.

It also was removed from image_decoders and token_decoders. It only
applies to io_transformers, as retaining history applies to the
destination (not source) IO buffer.

Also adjust example/bzcat and example/zcat to apply the history retain
length to the dst (not src) buffer.
This commit is contained in:
Nigel Tao committed 2023-12-17 12:26:08 +11:00
1 parent b4e09690a7
commit eed1af7bee
34 files changed
+179 -640

No files matched your search

+1 -2
View File
@@ -25,8 +25,7 @@ pri status "#internal error: inconsistent chunk type"
pri status "#internal error: inconsistent workbuf length"
pri status "#internal error: zlib decoder did not exhaust its input"
pub const DECODER_HISTORY_RETAIN_LENGTH_MAX_INCL_WORST_CASE : base.u64 = 0
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE : base.u64 = 0x0007_FFFF_F100_0007
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE : base.u64 = 0x0007_FFFF_F100_0007
// DECODER_SRC_IO_BUFFER_LENGTH_MIN_INCL is the minimum length of the src
// wuffs_base__io_buffer passed to the decoder.
-4
View File
@@ -1719,10 +1719,6 @@ pri func decoder.do_tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inf
return ok
}
pub func decoder.history_retain_length() base.optional_u63 {
return this.util.make_optional_u63(has_value: true, value: 0)
}
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl: this.overall_workbuf_length,