Rename decoder_max_incl_workbuf_len constants
diff --git a/example/library/library.c b/example/library/library.c
index 61c647b..7a61eea 100644
--- a/example/library/library.c
+++ b/example/library/library.c
@@ -53,7 +53,7 @@
};
size_t lgtm_len = 20;
-#define WORK_BUFFER_SIZE WUFFS_DEFLATE__DECODER_WORKBUF_LEN_MAX_INCL
+#define WORK_BUFFER_SIZE WUFFS_DEFLATE__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE
uint8_t work_buffer[WORK_BUFFER_SIZE];
// ignore_return_value suppresses errors from -Wall -Werror.
diff --git a/example/zcat/zcat.c b/example/zcat/zcat.c
index 8706072..1443157 100644
--- a/example/zcat/zcat.c
+++ b/example/zcat/zcat.c
@@ -69,7 +69,7 @@
#define SRC_BUFFER_SIZE (128 * 1024)
#endif
-#define WORK_BUFFER_SIZE WUFFS_GZIP__DECODER_WORKBUF_LEN_MAX_INCL
+#define WORK_BUFFER_SIZE WUFFS_GZIP__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE
uint8_t dst_buffer[DST_BUFFER_SIZE];
uint8_t src_buffer[SRC_BUFFER_SIZE];
diff --git a/fuzz/c/std/zlib_fuzzer.c b/fuzz/c/std/zlib_fuzzer.c
index dc04971..9455adb 100644
--- a/fuzz/c/std/zlib_fuzzer.c
+++ b/fuzz/c/std/zlib_fuzzer.c
@@ -48,7 +48,7 @@
#include "../../../release/c/wuffs-unsupported-snapshot.c"
#include "../fuzzlib/fuzzlib.c"
-#define WORK_BUFFER_SIZE WUFFS_ZLIB__DECODER_WORKBUF_LEN_MAX_INCL
+#define WORK_BUFFER_SIZE WUFFS_ZLIB__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE
uint8_t work_buffer[WORK_BUFFER_SIZE];
const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c
index f93fd9a..336744b 100644
--- a/release/c/wuffs-unsupported-snapshot.c
+++ b/release/c/wuffs-unsupported-snapshot.c
@@ -2639,10 +2639,10 @@
// ---------------- Public Consts
-#define WUFFS_DEFLATE__DECODER_WORKBUF_LEN_MAX_INCL 33280
+#define WUFFS_DEFLATE__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 33280
-static const uint64_t //
- wuffs_deflate__decoder_workbuf_len_max_incl //
+static const uint64_t //
+ wuffs_deflate__decoder_workbuf_len_max_incl_worst_case //
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
// ---------------- Struct Declarations
@@ -2820,10 +2820,10 @@
// ---------------- Public Consts
-#define WUFFS_LZW__DECODER_WORKBUF_LEN_MAX_INCL 0
+#define WUFFS_LZW__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 0
-static const uint64_t //
- wuffs_lzw__decoder_workbuf_len_max_incl //
+static const uint64_t //
+ wuffs_lzw__decoder_workbuf_len_max_incl_worst_case //
WUFFS_BASE__POTENTIALLY_UNUSED = 0;
// ---------------- Struct Declarations
@@ -2994,10 +2994,10 @@
// ---------------- Public Consts
-#define WUFFS_GIF__DECODER_WORKBUF_LEN_MAX_INCL 65535
+#define WUFFS_GIF__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 65535
-static const uint64_t //
- wuffs_gif__decoder_workbuf_len_max_incl //
+static const uint64_t //
+ wuffs_gif__decoder_workbuf_len_max_incl_worst_case //
WUFFS_BASE__POTENTIALLY_UNUSED = 65535;
// ---------------- Struct Declarations
@@ -3289,10 +3289,10 @@
// ---------------- Public Consts
-#define WUFFS_GZIP__DECODER_WORKBUF_LEN_MAX_INCL 33280
+#define WUFFS_GZIP__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 33280
-static const uint64_t //
- wuffs_gzip__decoder_workbuf_len_max_incl //
+static const uint64_t //
+ wuffs_gzip__decoder_workbuf_len_max_incl_worst_case //
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
// ---------------- Struct Declarations
@@ -3441,10 +3441,10 @@
// ---------------- Public Consts
-#define WUFFS_ZLIB__DECODER_WORKBUF_LEN_MAX_INCL 33280
+#define WUFFS_ZLIB__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE 33280
-static const uint64_t //
- wuffs_zlib__decoder_workbuf_len_max_incl //
+static const uint64_t //
+ wuffs_zlib__decoder_workbuf_len_max_incl_worst_case //
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
// ---------------- Struct Declarations
diff --git a/std/deflate/decode_deflate.wuffs b/std/deflate/decode_deflate.wuffs
index f1e4956..06a857e 100644
--- a/std/deflate/decode_deflate.wuffs
+++ b/std/deflate/decode_deflate.wuffs
@@ -31,7 +31,7 @@
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 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) {
diff --git a/std/gif/decode_gif.wuffs b/std/gif/decode_gif.wuffs
index b0e4327..4d4c305 100644
--- a/std/gif/decode_gif.wuffs
+++ b/std/gif/decode_gif.wuffs
@@ -24,8 +24,8 @@
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
diff --git a/std/gzip/decode_gzip.wuffs b/std/gzip/decode_gzip.wuffs
index a1e8437..9bad0a4 100644
--- a/std/gzip/decode_gzip.wuffs
+++ b/std/gzip/decode_gzip.wuffs
@@ -20,8 +20,8 @@
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.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) {
diff --git a/std/lzw/decode_lzw.wuffs b/std/lzw/decode_lzw.wuffs
index 038448a..d1aebb8 100644
--- a/std/lzw/decode_lzw.wuffs
+++ b/std/lzw/decode_lzw.wuffs
@@ -24,7 +24,7 @@
// - 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
diff --git a/std/zlib/decode_zlib.wuffs b/std/zlib/decode_zlib.wuffs
index f7d749d..ad2e345 100644
--- a/std/zlib/decode_zlib.wuffs
+++ b/std/zlib/decode_zlib.wuffs
@@ -22,8 +22,8 @@
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.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) {