Lines Matching refs:ds
935 deflate_state *ds;
948 ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
949 if (ds == Z_NULL) return Z_MEM_ERROR;
950 dest->state = (struct internal_state FAR *) ds;
951 zmemcpy(ds, ss, sizeof(deflate_state));
952 ds->strm = dest;
954 ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
955 ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
956 ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
957 overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
958 ds->pending_buf = (uchf *) overlay;
960 if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
961 ds->pending_buf == Z_NULL) {
966 zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
967 zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
968 zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
969 zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
971 ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
972 ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
973 ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
975 ds->l_desc.dyn_tree = ds->dyn_ltree;
976 ds->d_desc.dyn_tree = ds->dyn_dtree;
977 ds->bl_desc.dyn_tree = ds->bl_tree;