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

+2 -4
View File
@@ -73,16 +73,14 @@ DecodeJsonArgJsonPointer::DefaultValue() {
"wuffs_aux::DecodeJson: internal error: io_buf is closed"; \
goto done; \
} \
io_buf->compact_retaining( \
dec->history_retain_length().value_or(UINT64_MAX)); \
io_buf->compact(); \
if (io_buf->meta.wi >= io_buf->data.len) { \
ret_error_message = \
"wuffs_aux::DecodeJson: internal error: io_buf is full"; \
goto done; \
} \
cursor_index = io_buf->meta.ri; \
io_error_message = input.CopyIn( \
io_buf, dec->history_retain_length().value_or(UINT64_MAX)); \
io_error_message = input.CopyIn(io_buf); \
} else { \
ret_error_message = tok_status.message(); \
goto done; \