Rename decoder_max_incl_workbuf_len constants

This commit is contained in:
Nigel Tao committed 2019-02-03 15:44:25 +11:00
1 parent d9c36922db
commit fc4abafbe7
9 files changed
+32 -32

No files matched your search

+3 -3
View File
@@ -31,7 +31,7 @@ pri status "?internal error: inconsistent I/O"
pri status "?internal error: inconsistent distance"
pri status "?internal error: inconsistent n_bits"
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 512
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 32768 + 512
// The next two tables were created by script/print-deflate-magic-numbers.go.
//
@@ -127,8 +127,8 @@ pub struct decoder?(
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl:decoder_workbuf_len_max_incl,
max_incl:decoder_workbuf_len_max_incl)
min_incl:decoder_workbuf_len_max_incl_worst_case,
max_incl:decoder_workbuf_len_max_incl_worst_case)
}
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
+2 -2
View File
@@ -24,8 +24,8 @@ pub status "?too much pixel data"
pri status "?internal error: inconsistent ri/wi"
// TODO: reference lzw.decoder_workbuf_len_max_incl.
pub const decoder_workbuf_len_max_incl base.u64 = 0xFFFF
// TODO: reference lzw.decoder_workbuf_len_max_incl_worst_case.
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 0xFFFF
// See the spec appendix E "Interlaced Images" on page 29. The first element
// represents either that the frame was non-interlaced, or that all interlace
+4 -4
View File
@@ -20,8 +20,8 @@ pub status "?bad compression method"
pub status "?bad encoding flags"
pub status "?bad header"
// TODO: reference deflate.decoder_workbuf_len_max_incl.
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 512
// TODO: reference deflate.decoder_workbuf_len_max_incl_worst_case.
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 32768 + 512
pub struct decoder?(
flate deflate.decoder,
@@ -36,8 +36,8 @@ pub func decoder.set_ignore_checksum!(ic base.bool) {
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl:decoder_workbuf_len_max_incl,
max_incl:decoder_workbuf_len_max_incl)
min_incl:decoder_workbuf_len_max_incl_worst_case,
max_incl:decoder_workbuf_len_max_incl_worst_case)
}
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
+1 -1
View File
@@ -24,7 +24,7 @@ pri status "?internal error: inconsistent I/O"
// - 85be5b9 Delete the obsolete lzw.decoder.suffixes array
// and the roll back has combined numbers:
// - 3056a84 Roll back 3 recent lzw.decoder.suffixes commits
pub const decoder_workbuf_len_max_incl base.u64 = 0
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 0
pub struct decoder?(
// The value passed to set_literal_width. This lw field is copied to the
+4 -4
View File
@@ -22,8 +22,8 @@ pub status "?bad parity check"
pri status "?TODO: unsupported preset dictionary"
// TODO: reference deflate.decoder_workbuf_len_max_incl.
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 512
// TODO: reference deflate.decoder_workbuf_len_max_incl_worst_case.
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 32768 + 512
pub struct decoder?(
flate deflate.decoder,
@@ -38,8 +38,8 @@ pub func decoder.set_ignore_checksum!(ic base.bool) {
pub func decoder.workbuf_len() base.range_ii_u64 {
return this.util.make_range_ii_u64(
min_incl:decoder_workbuf_len_max_incl,
max_incl:decoder_workbuf_len_max_incl)
min_incl:decoder_workbuf_len_max_incl_worst_case,
max_incl:decoder_workbuf_len_max_incl_worst_case)
}
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {