Add public max_incl_workbuf_len constants

This commit is contained in:
Nigel Tao committed 2019-02-02 15:51:04 +11:00
1 parent c9830ceb9a
commit be2d96bb27
8 files changed
+35 -2

No files matched your search

+2
View File
@@ -31,6 +31,8 @@ pri status "?internal error: inconsistent I/O"
pri status "?internal error: inconsistent distance"
pri status "?internal error: inconsistent n_bits"
pub const max_incl_workbuf_len base.u64 = 32768 + 512
// The next two tables were created by script/print-deflate-magic-numbers.go.
//
// The u32 values' meanings are the same as the decoder.huffs u32 values. In
+3
View File
@@ -24,6 +24,9 @@ pub status "?too much pixel data"
pri status "?internal error: inconsistent ri/wi"
// TODO: reference lzw.max_incl_workbuf_len.
pub const max_incl_workbuf_len 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
// stages are complete. Otherwise, the four interlace stages are elements 4, 3,
+3
View File
@@ -20,6 +20,9 @@ pub status "?bad compression method"
pub status "?bad encoding flags"
pub status "?bad header"
// TODO: reference deflate.max_incl_workbuf_len.
pub const max_incl_workbuf_len base.u64 = 32768 + 512
pub struct decoder?(
flate deflate.decoder,
checksum crc32.ieee_hasher,
+4
View File
@@ -16,6 +16,10 @@ pub status "?bad code"
pri status "?internal error: inconsistent I/O"
// TODO: move bulk data buffers like decoder.suffixes or decoder.output into
// the workbuf?
pub const max_incl_workbuf_len base.u64 = 0
pub struct decoder?(
// The value passed to set_literal_width. This lw field is copied to the
// literal_width field at the start of the decode method. During that
+3
View File
@@ -22,6 +22,9 @@ pub status "?bad parity check"
pri status "?TODO: unsupported preset dictionary"
// TODO: reference deflate.max_incl_workbuf_len.
pub const max_incl_workbuf_len base.u64 = 32768 + 512
pub struct decoder?(
flate deflate.decoder,
checksum adler32.hasher,