=========================================================================== * Initialize a new block. */
| 437 | * Initialize a new block. |
| 438 | */ |
| 439 | local void init_block(deflate_state *s) { |
| 440 | int n; /* iterates over tree elements */ |
| 441 | |
| 442 | /* Initialize the trees. */ |
| 443 | for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; |
| 444 | for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; |
| 445 | for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; |
| 446 | |
| 447 | s->dyn_ltree[END_BLOCK].Freq = 1; |
| 448 | s->opt_len = s->static_len = 0L; |
| 449 | s->sym_next = s->matches = 0; |
| 450 | } |
| 451 | |
| 452 | /* =========================================================================== |
| 453 | * Initialize the tree data structures for a new zlib stream. |