Home | History | Annotate | Download | only in zlib

Lines Matching refs:ds

937     deflate_state *ds;
950 ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
951 if (ds == Z_NULL) return Z_MEM_ERROR;
952 dest->state = (struct internal_state FAR *) ds;
953 zmemcpy(ds, ss, sizeof(deflate_state));
954 ds->strm = dest;
956 ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
957 ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
958 ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
959 overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
960 ds->pending_buf = (uchf *) overlay;
962 if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
963 ds->pending_buf == Z_NULL) {
968 zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
969 zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
970 zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
971 zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
973 ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
974 ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
975 ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
977 ds->l_desc.dyn_tree = ds->dyn_ltree;
978 ds->d_desc.dyn_tree = ds->dyn_dtree;
979 ds->bl_desc.dyn_tree = ds->bl_tree;