=========================================================================== * Initialize a new block. */
(s)
| 407 | * Initialize a new block. |
| 408 | */ |
| 409 | local void init_block(s) |
| 410 | deflate_state *s; |
| 411 | { |
| 412 | int n; /* iterates over tree elements */ |
| 413 | |
| 414 | /* Initialize the trees. */ |
| 415 | for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; |
| 416 | for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; |
| 417 | for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; |
| 418 | |
| 419 | s->dyn_ltree[END_BLOCK].Freq = 1; |
| 420 | s->opt_len = s->static_len = 0L; |
| 421 | s->last_lit = s->matches = 0; |
| 422 | } |
| 423 | |
| 424 | #define SMALLEST 1 |
| 425 | /* Index within the heap array of least frequent node in the Huffman tree */ |