Prusa MINI Firmware overview
|
Go to the documentation of this file.
30 #define LENGTH_CODES 29
36 #define L_CODES (LITERALS+1+LENGTH_CODES)
45 #define HEAP_SIZE (2*L_CODES+1)
56 # define GZIP_STATE 57
58 #define EXTRA_STATE 69
60 #define COMMENT_STATE 91
61 #define HCRC_STATE 103
62 #define BUSY_STATE 113
63 #define FINISH_STATE 666
182 # define max_insert_length max_lazy_match
281 #define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
284 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
289 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
294 #define WIN_INIT MAX_MATCH
302 ulg stored_len,
int last));
306 ulg stored_len,
int last));
308 #define d_code(dist) \
309 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
318 #if defined(GEN_TREES_H) || !defined(STDC)
326 # define _tr_tally_lit(s, c, flush) \
328 s->d_buf[s->last_lit] = 0; \
329 s->l_buf[s->last_lit++] = cc; \
330 s->dyn_ltree[cc].Freq++; \
331 flush = (s->last_lit == s->lit_bufsize-1); \
333 # define _tr_tally_dist(s, distance, length, flush) \
334 { uch len = (uch)(length); \
335 ush dist = (ush)(distance); \
336 s->d_buf[s->last_lit] = dist; \
337 s->l_buf[s->last_lit++] = len; \
339 s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
340 s->dyn_dtree[d_code(dist)].Freq++; \
341 flush = (s->last_lit == s->lit_bufsize-1); \
344 # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
345 # define _tr_tally_dist(s, distance, length, flush) \
346 flush = _tr_tally(s, distance, length)
#define Z_MEM_ERROR
Definition: zlib.h:183
Byte FAR Bytef
Definition: zconf.h:400
block_state deflate_fast(deflate_state *s, int flush)
Definition: deflate.c:1824
block_state deflate_slow(deflate_state *s, int flush)
Definition: deflate.c:1926
voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size)
Definition: zutil.c:305
ush Pos
Definition: deflate.h:92
#define MAX_BITS
Definition: deflate.h:48
#define HCRC_UPDATE(beg)
Definition: deflate.c:755
const static_tree_desc * stat_desc
Definition: deflate.h:89
#define check_match(s, start, match, length)
Definition: deflate.c:1469
ulg window_size
Definition: deflate.h:129
int heap_max
Definition: deflate.h:211
unsigned IPos
Definition: deflate.h:94
#define Assert(cond, msg)
Definition: zutil.h:248
ush max_chain
Definition: deflate.c:124
struct ct_data_s bl_tree[2 *BL_CODES+1]
Definition: deflate.h:200
compress_func func
Definition: deflate.c:125
uInt max_chain_length
Definition: deflate.h:171
uInt ins_h
Definition: deflate.h:142
int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength)
Definition: deflate.c:445
unsigned char uch
Definition: zutil.h:43
#define Z_BUF_ERROR
Definition: zlib.h:184
#define RANK(f)
Definition: deflate.c:155
ulg opt_len
Definition: deflate.h:250
char FAR charf
Definition: zconf.h:402
ush code
Definition: deflate.h:71
block_state
Definition: deflate.c:66
int ZEXPORT deflateEnd(z_streamp strm)
Definition: deflate.c:1076
unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size)
Definition: deflate.c:1164
ulg gzindex
Definition: deflate.h:109
#define OS_CODE
Definition: zutil.h:198
const char deflate_copyright[]
Definition: deflate.c:54
ulg static_len
Definition: deflate.h:251
unsigned long uLong
Definition: zconf.h:394
IPos prev_match
Definition: deflate.h:160
#define TOO_FAR
Definition: deflate.c:111
uInt insert
Definition: deflate.h:253
#define INIT_STATE
Definition: deflate.h:54
#define Z_FULL_FLUSH
Definition: zlib.h:171
#define Z_UNKNOWN
Definition: zlib.h:206
#define Z_DATA_ERROR
Definition: zlib.h:182
#define WIN_INIT
Definition: deflate.h:294
ulg high_water
Definition: deflate.h:269
Posf * head
Definition: deflate.h:140
start
Definition: g29_auto.py:150
#define BUSY_STATE
Definition: deflate.h:62
uInt lookahead
Definition: deflate.h:164
Byte method
Definition: deflate.h:110
#define Z_FINISH
Definition: zlib.h:172
Definition: deflate.h:100
int heap[2 *L_CODES+1]
Definition: deflate.h:209
#define Z_STREAM_ERROR
Definition: zlib.h:181
void putShortMSB(deflate_state *s, uInt b)
Definition: deflate.c:716
#define MIN_LOOKAHEAD
Definition: deflate.h:284
#define BL_CODES
Definition: deflate.h:42
Posf * prev
Definition: deflate.h:134
Bytef * pending_buf
Definition: deflate.h:103
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uInt len)
Definition: crc32.c:237
#define UPDATE_HASH(s, h, c)
Definition: deflate.c:163
gz_header FAR * gz_headerp
Definition: zlib.h:131
#define Z_PARTIAL_FLUSH
Definition: zlib.h:169
const config configuration_table[10]
Definition: deflate.c:134
uchf * l_buf
Definition: deflate.h:220
uch FAR uchf
Definition: zutil.h:44
void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s)
Definition: trees.c:886
uInt match_start
Definition: deflate.h:163
z_streamp strm
Definition: deflate.h:101
int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain)
Definition: deflate.c:617
int ZEXPORT deflatePrime(z_streamp strm, int bits, int value)
Definition: deflate.c:542
#define MAX_MEM_LEVEL
Definition: zconf.h:260
ush len
Definition: deflate.h:75
uInt lit_bufsize
Definition: deflate.h:222
#define ZLIB_VERSION
Definition: zlib.h:40
void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, ulg stored_len, int last)
Definition: trees.c:863
Byte FAR * voidpf
Definition: zconf.h:413
uInt max_lazy_match
Definition: deflate.h:177
Bytef * pending_out
Definition: deflate.h:105
#define MAX_MATCH
Definition: zutil.h:78
#define MAX_DIST(s)
Definition: deflate.h:289
#define Z_NULL
Definition: zlib.h:212
uInt last_lit
Definition: deflate.h:242
uInt hash_mask
Definition: deflate.h:145
#define Z_HUFFMAN_ONLY
Definition: zlib.h:197
void ZLIB_INTERNAL _tr_init OF((deflate_state *s))
#define Z_BLOCK
Definition: zlib.h:173
int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)
Definition: deflate.c:240
uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen)
Definition: deflate.c:652
unsigned char Byte
Definition: zconf.h:391
#define z_const
Definition: zconf.h:237
#define Z_NO_FLUSH
Definition: zlib.h:168
gz_headerp gzhead
Definition: deflate.h:108
unsigned short ush
Definition: zutil.h:45
int level
Definition: deflate.h:188
ulg pending_buf_size
Definition: deflate.h:104
uch ZLIB_INTERNAL _dist_code[]
Definition: trees.c:98
#define TRY_FREE(s, p)
Definition: zutil.h:265
#define DEF_MEM_LEVEL
Definition: gzguts.h:150
#define MAX_STORED
Definition: deflate.c:1623
#define _tr_tally_dist(s, distance, length, flush)
Definition: deflate.h:333
#define _tr_tally_lit(s, c, flush)
Definition: deflate.h:326
struct ct_data_s dyn_ltree[HEAP_SIZE]
Definition: deflate.h:198
void fill_window(deflate_state *s)
Definition: deflate.c:1482
struct tree_desc_s d_desc
Definition: deflate.h:203
ush dad
Definition: deflate.h:74
#define MIN(a, b)
Definition: deflate.c:1626
#define HEAP_SIZE
Definition: deflate.h:45
#define ERR_MSG(err)
Definition: zutil.h:52
z_stream FAR * z_streamp
Definition: zlib.h:108
int deflateStateCheck(z_streamp strm)
Definition: deflate.c:353
#define put_byte(s, c)
Definition: deflate.h:281
#define ERR_RETURN(strm, err)
Definition: zutil.h:54
uInt strstart
Definition: deflate.h:162
ushf * d_buf
Definition: deflate.h:244
#define Z_OK
Definition: zlib.h:177
#define FAR
Definition: zconf.h:387
int max_code
Definition: deflate.h:88
int wrap
Definition: deflate.h:107
#define COMMENT_STATE
Definition: deflate.h:60
uInt prev_length
Definition: deflate.h:166
#define Buf_size
Definition: deflate.h:51
ush FAR ushf
Definition: zutil.h:46
uInt w_size
Definition: deflate.h:115
#define NAME_STATE
Definition: deflate.h:59
ush bi_buf
Definition: deflate.h:260
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
while(sofevent)
Definition: USB_HOST_SHIELD.h:456
int nice_match
Definition: deflate.h:194
#define L(CODE)
Definition: macros.h:76
#define Z_FIXED
Definition: zlib.h:199
Pos FAR Posf
Definition: deflate.h:93
#define Z_STREAM_END
Definition: zlib.h:178
#define PRESET_DICT
Definition: zutil.h:81
ush bl_count[MAX_BITS+1]
Definition: deflate.h:206
int ZEXPORT deflateCopy(z_streamp dest, z_streamp source)
Definition: deflate.c:1102
int ZEXPORT deflateResetKeep(z_streamp strm)
Definition: deflate.c:467
#define local
Definition: gzguts.h:115
#define Z_DEFAULT_STRATEGY
Definition: zlib.h:200
#define NIL
Definition: deflate.c:107
void ZLIB_INTERNAL zmemzero(Bytef *dest, uInt len)
Definition: zutil.c:173
#define FLUSH_BLOCK(s, last)
Definition: deflate.c:1617
int bi_valid
Definition: deflate.h:264
#define FINISH_STATE
Definition: deflate.h:63
#define GZIP_STATE
Definition: deflate.h:56
#define EXTRA_STATE
Definition: deflate.h:58
void ZLIB_INTERNAL zmemcpy(Bytef *dest, const Bytef *source, uInt len)
Definition: zutil.c:149
void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr)
Definition: zutil.c:315
uInt longest_match(deflate_state *s, IPos cur_match)
Definition: deflate.c:1236
struct ct_data_s dyn_dtree[2 *D_CODES+1]
Definition: deflate.h:199
ush good_length
Definition: deflate.c:121
struct tree_desc_s bl_desc
Definition: deflate.h:204
ush nice_length
Definition: deflate.c:123
uInt w_bits
Definition: deflate.h:116
#define Z_DEFLATED
Definition: zlib.h:209
static status_t status
Definition: filament_sensor.c:37
uInt hash_bits
Definition: deflate.h:144
ush freq
Definition: deflate.h:70
block_state deflate_stored(deflate_state *s, int flush)
Definition: deflate.c:1643
uInt good_match
Definition: deflate.h:191
#define Z_VERSION_ERROR
Definition: zlib.h:185
int last_flush
Definition: deflate.h:111
#define MIN_MATCH
Definition: zutil.h:77
#define ZLIB_INTERNAL
Definition: compress.c:8
int heap_len
Definition: deflate.h:210
#define Z_RLE
Definition: zlib.h:198
int match_available
Definition: deflate.h:161
#define CLEAR_HASH(s)
Definition: deflate.c:192
block_state deflate_rle(deflate_state *s, int flush)
Definition: deflate.c:2057
uInt match_length
Definition: deflate.h:159
int ZEXPORT deflate(z_streamp strm, int flush)
Definition: deflate.c:763
Definition: deflate.c:120
uInt hash_shift
Definition: deflate.h:147
void flush_pending(z_streamp strm)
Definition: deflate.c:730
int
Definition: createSpeedLookupTable.py:15
#define MAX_WBITS
Definition: zconf.h:270
struct tree_desc_s l_desc
Definition: deflate.h:202
#define ZEXPORT
Definition: zconf.h:380
int ZEXPORT deflateReset(z_streamp strm)
Definition: deflate.c:505
#define Z_FILTERED
Definition: zlib.h:196
void slide_hash(deflate_state *s)
Definition: deflate.c:201
Bytef * window
Definition: deflate.h:119
int status
Definition: deflate.h:102
#define Z_DEFAULT_COMPRESSION
Definition: zlib.h:193
int ZLIB_INTERNAL zmemcmp(Bytef *s1, const Bytef *s2, uInt len) const
Definition: zutil.c:160
int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
Definition: deflate.c:376
#define L_CODES
Definition: deflate.h:36
ulg pending
Definition: deflate.h:106
unsigned int uInt
Definition: zconf.h:393
#define D_CODES
Definition: deflate.h:39
#define ZALLOC(strm, items, size)
Definition: zutil.h:262
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
Definition: adler32.c:134
png_uint_32 length
Definition: png.c:2247
ct_data * dyn_tree
Definition: deflate.h:87
void lm_init(deflate_state *s)
Definition: deflate.c:1194
void ZLIB_INTERNAL _tr_align(deflate_state *s)
Definition: trees.c:896
uInt matches
Definition: deflate.h:252
ush max_lazy
Definition: deflate.c:122
#define ZFREE(strm, addr)
Definition: zutil.h:264
block_state compress_func OF((deflate_state *s, int flush))
Definition: deflate.c:73
struct internal_state deflate_state
unsigned long ulg
Definition: zutil.h:47
list b
Definition: createSpeedLookupTable.py:30
#define GZIP
Definition: deflate.h:23
#define Tracevv(x)
Definition: zutil.h:251
#define INSERT_STRING(s, str, match_head)
Definition: deflate.c:182
int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits)
Definition: deflate.c:528
#define FLUSH_BLOCK_ONLY(s, last)
Definition: deflate.c:1605
struct tree_desc_s tree_desc
long block_start
Definition: deflate.h:154
void ZLIB_INTERNAL _tr_init(deflate_state *s)
Definition: trees.c:379
void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, int last)
Definition: trees.c:911
int ZEXPORT deflateSetHeader(z_streamp strm, gz_headerp head)
Definition: deflate.c:517
int strategy
Definition: deflate.h:189
#define HCRC_STATE
Definition: deflate.h:61
uInt w_mask
Definition: deflate.h:117
uch ZLIB_INTERNAL _length_code[]
Definition: trees.c:104
uInt hash_size
Definition: deflate.h:143
block_state deflate_huff(deflate_state *s, int flush)
Definition: deflate.c:2130
int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version, int stream_size)
Definition: deflate.c:228
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc)
Definition: trees.c:1014
static png_bytep size_t size
Definition: pngwrite.c:2170
int ZEXPORT deflateParams(z_streamp strm, int level, int strategy)
Definition: deflate.c:568
uch depth[2 *L_CODES+1]
Definition: deflate.h:216