Lines Matching refs:ds
930 deflate_state *ds;
943 ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
944 if (ds == Z_NULL) return Z_MEM_ERROR;
945 dest->state = (struct internal_state FAR *) ds;
946 zmemcpy(ds, ss, sizeof(deflate_state));
947 ds->strm = dest;
949 ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
950 ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
951 ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
952 overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
953 ds->pending_buf = (uchf *) overlay;
955 if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
956 ds->pending_buf == Z_NULL) {
961 zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
962 zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
963 zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
964 zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
966 ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
967 ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
968 ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
970 ds->l_desc.dyn_tree = ds->dyn_ltree;
971 ds->d_desc.dyn_tree = ds->dyn_dtree;
972 ds->bl_desc.dyn_tree = ds->bl_tree;