=========================================================================== * Initialize the tree data structures for a new zlib stream. */
| 453 | * Initialize the tree data structures for a new zlib stream. |
| 454 | */ |
| 455 | void ZLIB_INTERNAL _tr_init(deflate_state *s) { |
| 456 | tr_static_init(); |
| 457 | |
| 458 | s->l_desc.dyn_tree = s->dyn_ltree; |
| 459 | s->l_desc.stat_desc = &static_l_desc; |
| 460 | |
| 461 | s->d_desc.dyn_tree = s->dyn_dtree; |
| 462 | s->d_desc.stat_desc = &static_d_desc; |
| 463 | |
| 464 | s->bl_desc.dyn_tree = s->bl_tree; |
| 465 | s->bl_desc.stat_desc = &static_bl_desc; |
| 466 | |
| 467 | s->bi_buf = 0; |
| 468 | s->bi_valid = 0; |
| 469 | #ifdef ZLIB_DEBUG |
| 470 | s->compressed_len = 0L; |
| 471 | s->bits_sent = 0L; |
| 472 | #endif |
| 473 | |
| 474 | /* Initialize the first block of the first file: */ |
| 475 | init_block(s); |
| 476 | } |
| 477 | |
| 478 | #define SMALLEST 1 |
| 479 | /* Index within the heap array of least frequent node in the Huffman tree */ |
no test coverage detected