mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Rename decoder_max_incl_workbuf_len constants
This commit is contained in:
1 parent
d9c36922db
commit
fc4abafbe7
9 files changed
+32
-32
No files matched your search
@@ -53,7 +53,7 @@ uint8_t lgtm_ptr[] = {
|
|||||||
};
|
};
|
||||||
size_t lgtm_len = 20;
|
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];
|
uint8_t work_buffer[WORK_BUFFER_SIZE];
|
||||||
|
|
||||||
// ignore_return_value suppresses errors from -Wall -Werror.
|
// ignore_return_value suppresses errors from -Wall -Werror.
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ for a C compiler $CC, such as clang or gcc.
|
|||||||
#define SRC_BUFFER_SIZE (128 * 1024)
|
#define SRC_BUFFER_SIZE (128 * 1024)
|
||||||
#endif
|
#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 dst_buffer[DST_BUFFER_SIZE];
|
||||||
uint8_t src_buffer[SRC_BUFFER_SIZE];
|
uint8_t src_buffer[SRC_BUFFER_SIZE];
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ It should print "PASS", amongst other information, and exit(0).
|
|||||||
#include "../../../release/c/wuffs-unsupported-snapshot.c"
|
#include "../../../release/c/wuffs-unsupported-snapshot.c"
|
||||||
#include "../fuzzlib/fuzzlib.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];
|
uint8_t work_buffer[WORK_BUFFER_SIZE];
|
||||||
|
|
||||||
const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
||||||
|
|||||||
@@ -2639,10 +2639,10 @@ extern const char* wuffs_deflate__error__no_huffman_codes;
|
|||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- 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 //
|
static const uint64_t //
|
||||||
wuffs_deflate__decoder_workbuf_len_max_incl //
|
wuffs_deflate__decoder_workbuf_len_max_incl_worst_case //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
@@ -2820,10 +2820,10 @@ extern const char* wuffs_lzw__error__bad_code;
|
|||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- 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 //
|
static const uint64_t //
|
||||||
wuffs_lzw__decoder_workbuf_len_max_incl //
|
wuffs_lzw__decoder_workbuf_len_max_incl_worst_case //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 0;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 0;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
@@ -2994,10 +2994,10 @@ extern const char* wuffs_gif__error__too_much_pixel_data;
|
|||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- 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 //
|
static const uint64_t //
|
||||||
wuffs_gif__decoder_workbuf_len_max_incl //
|
wuffs_gif__decoder_workbuf_len_max_incl_worst_case //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 65535;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 65535;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
@@ -3289,10 +3289,10 @@ extern const char* wuffs_gzip__error__bad_header;
|
|||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- 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 //
|
static const uint64_t //
|
||||||
wuffs_gzip__decoder_workbuf_len_max_incl //
|
wuffs_gzip__decoder_workbuf_len_max_incl_worst_case //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
@@ -3441,10 +3441,10 @@ extern const char* wuffs_zlib__error__bad_parity_check;
|
|||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- 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 //
|
static const uint64_t //
|
||||||
wuffs_zlib__decoder_workbuf_len_max_incl //
|
wuffs_zlib__decoder_workbuf_len_max_incl_worst_case //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 33280;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ pri status "?internal error: inconsistent I/O"
|
|||||||
pri status "?internal error: inconsistent distance"
|
pri status "?internal error: inconsistent distance"
|
||||||
pri status "?internal error: inconsistent n_bits"
|
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.
|
// 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 {
|
pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||||
return this.util.make_range_ii_u64(
|
return this.util.make_range_ii_u64(
|
||||||
min_incl:decoder_workbuf_len_max_incl,
|
min_incl:decoder_workbuf_len_max_incl_worst_case,
|
||||||
max_incl:decoder_workbuf_len_max_incl)
|
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) {
|
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ pub status "?too much pixel data"
|
|||||||
|
|
||||||
pri status "?internal error: inconsistent ri/wi"
|
pri status "?internal error: inconsistent ri/wi"
|
||||||
|
|
||||||
// TODO: reference lzw.decoder_workbuf_len_max_incl.
|
// TODO: reference lzw.decoder_workbuf_len_max_incl_worst_case.
|
||||||
pub const decoder_workbuf_len_max_incl base.u64 = 0xFFFF
|
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
|
// 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
|
// represents either that the frame was non-interlaced, or that all interlace
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ pub status "?bad compression method"
|
|||||||
pub status "?bad encoding flags"
|
pub status "?bad encoding flags"
|
||||||
pub status "?bad header"
|
pub status "?bad header"
|
||||||
|
|
||||||
// TODO: reference deflate.decoder_workbuf_len_max_incl.
|
// TODO: reference deflate.decoder_workbuf_len_max_incl_worst_case.
|
||||||
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 512
|
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 32768 + 512
|
||||||
|
|
||||||
pub struct decoder?(
|
pub struct decoder?(
|
||||||
flate deflate.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 {
|
pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||||
return this.util.make_range_ii_u64(
|
return this.util.make_range_ii_u64(
|
||||||
min_incl:decoder_workbuf_len_max_incl,
|
min_incl:decoder_workbuf_len_max_incl_worst_case,
|
||||||
max_incl:decoder_workbuf_len_max_incl)
|
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) {
|
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ pri status "?internal error: inconsistent I/O"
|
|||||||
// - 85be5b9 Delete the obsolete lzw.decoder.suffixes array
|
// - 85be5b9 Delete the obsolete lzw.decoder.suffixes array
|
||||||
// and the roll back has combined numbers:
|
// and the roll back has combined numbers:
|
||||||
// - 3056a84 Roll back 3 recent lzw.decoder.suffixes commits
|
// - 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?(
|
pub struct decoder?(
|
||||||
// The value passed to set_literal_width. This lw field is copied to the
|
// The value passed to set_literal_width. This lw field is copied to the
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ pub status "?bad parity check"
|
|||||||
|
|
||||||
pri status "?TODO: unsupported preset dictionary"
|
pri status "?TODO: unsupported preset dictionary"
|
||||||
|
|
||||||
// TODO: reference deflate.decoder_workbuf_len_max_incl.
|
// TODO: reference deflate.decoder_workbuf_len_max_incl_worst_case.
|
||||||
pub const decoder_workbuf_len_max_incl base.u64 = 32768 + 512
|
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 32768 + 512
|
||||||
|
|
||||||
pub struct decoder?(
|
pub struct decoder?(
|
||||||
flate deflate.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 {
|
pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||||
return this.util.make_range_ii_u64(
|
return this.util.make_range_ii_u64(
|
||||||
min_incl:decoder_workbuf_len_max_incl,
|
min_incl:decoder_workbuf_len_max_incl_worst_case,
|
||||||
max_incl:decoder_workbuf_len_max_incl)
|
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) {
|
pub func decoder.decode_io_writer?(dst base.io_writer, src base.io_reader, workbuf slice base.u8) {
|
||||||
|
|||||||
Reference in new issue
Block a user