=========================================================================== * Initialize the tree data structures for a new zlib stream. */
(s)
| 380 | * Initialize the tree data structures for a new zlib stream. |
| 381 | */ |
| 382 | void _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. |
no test coverage detected