Lines Matching refs:ds
901 deflate_state *ds;
914 ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
915 if (ds == Z_NULL) return Z_MEM_ERROR;
916 dest->state = (struct internal_state FAR *) ds;
917 zmemcpy(ds, ss, sizeof(deflate_state));
918 ds->strm = dest;
920 ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
921 ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
922 ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
923 overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
924 ds->pending_buf = (uchf *) overlay;
926 if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
927 ds->pending_buf == Z_NULL) {
932 zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
933 zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
934 zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
935 zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
937 ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
938 ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
939 ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
941 ds->l_desc.dyn_tree = ds->dyn_ltree;
942 ds->d_desc.dyn_tree = ds->dyn_dtree;
943 ds->bl_desc.dyn_tree = ds->bl_tree;