MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / _tr_init

Function _tr_init

zlib/trees.c:382–406  ·  view source on GitHub ↗

=========================================================================== * Initialize the tree data structures for a new zlib stream. */

(s)

Source from the content-addressed store, hash-verified

380 * Initialize the tree data structures for a new zlib stream.
381 */
382void _tr_init(s)
383 deflate_state *s;
384{
385 tr_static_init();
386
387 s->l_desc.dyn_tree = s->dyn_ltree;
388 s->l_desc.stat_desc = &static_l_desc;
389
390 s->d_desc.dyn_tree = s->dyn_dtree;
391 s->d_desc.stat_desc = &static_d_desc;
392
393 s->bl_desc.dyn_tree = s->bl_tree;
394 s->bl_desc.stat_desc = &static_bl_desc;
395
396 s->bi_buf = 0;
397 s->bi_valid = 0;
398 s->last_eob_len = 8; /* enough lookahead for inflate */
399#ifdef DEBUG
400 s->compressed_len = 0L;
401 s->bits_sent = 0L;
402#endif
403
404 /* Initialize the first block of the first file: */
405 init_block(s);
406}
407
408/* ===========================================================================
409 * Initialize a new block.

Callers 1

deflateResetFunction · 0.85

Calls 2

tr_static_initFunction · 0.85
init_blockFunction · 0.85

Tested by

no test coverage detected