Home | History | Annotate | Download | only in zlib

Lines Matching refs:copy

22  * - Unroll direct copy to three copies per loop in inffast.c
39 * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
48 * - Unroll last copy for window match in inflate_fast()
370 local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
391 /* copy state->wsize or less output bytes into the circular window */
392 if (copy >= state->wsize) {
399 if (dist > copy) dist = copy;
400 zmemcpy(state->window + state->wnext, end - copy, dist);
401 copy -= dist;
402 if (copy) {
403 zmemcpy(state->window, end - copy, copy);
404 state->wnext = copy;
578 and there is no window currently, goto inf_leave will create one and copy
600 unsigned copy; /* number of stored or match bytes to copy */
601 unsigned char FAR *from; /* where to copy match bytes from */
604 unsigned len; /* length to copy for repeats, bits to drop */
736 copy = state->length;
737 if (copy > have) copy = have;
738 if (copy) {
744 len + copy > state->head->extra_max ?
745 state->head->extra_max - len : copy);
748 state->check = crc32(state->check, next, copy);
749 have -= copy;
750 next += copy;
751 state->length -= copy;
761 copy = 0;
763 len = (unsigned)(next[copy++]);
768 } while (len && copy < have);
770 state->check = crc32(state->check, next, copy);
771 have -= copy;
772 next += copy;
783 copy = 0;
785 len = (unsigned)(next[copy++]);
790 } while (len && copy < have);
792 state->check = crc32(state->check, next, copy);
793 have -= copy;
794 next += copy;
888 state->mode = COPY;
890 case COPY:
891 copy = state->length;
892 if (copy) {
893 if (copy > have) copy = have;
894 if (copy > left) copy = left;
895 if (copy == 0) goto inf_leave;
896 copy);
897 have -= copy;
898 next += copy;
899 left -= copy;
900 put += copy;
901 state->length -= copy;
969 copy = 3 + BITS(2);
976 copy = 3 + BITS(3);
983 copy = 11 + BITS(7);
986 if (state->have + copy > state->nlen + state->ndist) {
991 while (copy--)
1143 copy = out - left;
1144 if (state->offset > copy) { /* copy from window */
1145 copy = state->offset - copy;
1146 if (copy > state->whave) {
1154 copy -= state->whave;
1155 if (copy > state->length) copy = state->length;
1156 if (copy > left) copy = left;
1157 left -= copy;
1158 state->length -= copy;
1161 } while (--copy);
1166 if (copy > state->wnext) {
1167 copy -= state->wnext;
1168 from = state->window + (state->wsize - copy);
1171 from = state->window + (state->wnext - copy);
1172 if (copy > state->length) copy = state->length;
1174 else { /* copy from output */
1176 copy = state->length;
1178 if (copy > left) copy = left;
1179 left -= copy;
1180 state->length -= copy;
1183 } while (--copy);
1295 /* copy dictionary */
1327 /* copy dictionary to window using updatewindow(), which will amend the
1450 struct inflate_state FAR *copy;
1460 copy = (struct inflate_state FAR *)
1462 if (copy == Z_NULL) return Z_MEM_ERROR;
1468 ZFREE(source, copy);
1473 /* copy state */
1475 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
1476 copy->strm = dest;
1479 copy->lencode = copy->codes + (state->lencode - state->codes);
1480 copy->distcode = copy->codes + (state->distcode - state->codes);
1482 copy->next = copy->codes + (state->next - state->codes);
1487 copy->window = window;
1488 dest->state = (struct internal_state FAR *)copy;
1526 (state->mode == COPY ? state->length :