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