MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _tr_init

Function _tr_init

freebsd/contrib/zlib/trees.c:379–402  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

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

Callers 1

deflate.cFile · 0.85

Calls 2

tr_static_initFunction · 0.85
init_blockFunction · 0.70

Tested by

no test coverage detected