Lines Matching defs:copy

20  * - Unroll direct copy to three copies per loop in inffast.c
37 * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
46 * - Unroll last copy for window match in inflate_fast()
369 local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
390 /* copy state->wsize or less output bytes into the circular window */
391 if (copy >= state->wsize) {
398 if (dist > copy) dist = copy;
399 zmemcpy(state->window + state->wnext, end - copy, dist);
400 copy -= dist;
401 if (copy) {
402 zmemcpy(state->window, end - copy, copy);
403 state->wnext = copy;
577 and there is no window currently, goto inf_leave will create one and copy
599 unsigned copy; /* number of stored or match bytes to copy */
600 unsigned char FAR *from; /* where to copy match bytes from */
603 unsigned len; /* length to copy for repeats, bits to drop */
728 copy = state->length;
729 if (copy > have) copy = have;
730 if (copy) {
736 len + copy > state->head->extra_max ?
737 state->head->extra_max - len : copy);
740 state->check = crc32(state->check, next, copy);
741 have -= copy;
742 next += copy;
743 state->length -= copy;
753 copy = 0;
755 len = (unsigned)(next[copy++]);
760 } while (len && copy < have);
762 state->check = crc32(state->check, next, copy);
763 have -= copy;
764 next += copy;
775 copy = 0;
777 len = (unsigned)(next[copy++]);
782 } while (len && copy < have);
784 state->check = crc32(state->check, next, copy);
785 have -= copy;
786 next += copy;
883 copy = state->length;
884 if (copy) {
885 if (copy > have) copy = have;
886 if (copy > left) copy = left;
887 if (copy == 0) goto inf_leave;
888 zmemcpy(put, next, copy);
889 have -= copy;
890 next += copy;
891 left -= copy;
892 put += copy;
893 state->length -= copy;
961 copy = 3 + BITS(2);
968 copy = 3 + BITS(3);
975 copy = 11 + BITS(7);
978 if (state->have + copy > state->nlen + state->ndist) {
983 while (copy--)
1136 copy = out - left;
1137 if (state->offset > copy) { /* copy from window */
1138 copy = state->offset - copy;
1139 if (copy > state->whave) {
1147 copy -= state->whave;
1148 if (copy > state->length) copy = state->length;
1149 if (copy > left) copy = left;
1150 left -= copy;
1151 state->length -= copy;
1154 } while (--copy);
1159 if (copy > state->wnext) {
1160 copy -= state->wnext;
1161 from = state->window + (state->wsize - copy);
1164 from = state->window + (state->wnext - copy);
1165 if (copy > state->length) copy = state->length;
1167 else { /* copy from output */
1169 copy = state->length;
1171 if (copy > left) copy = left;
1172 left -= copy;
1173 state->length -= copy;
1176 } while (--copy);
1288 /* copy dictionary */
1320 /* copy dictionary to window using updatewindow(), which will amend the
1443 struct inflate_state FAR *copy;
1453 copy = (struct inflate_state FAR *)
1455 if (copy == Z_NULL) return Z_MEM_ERROR;
1461 ZFREE(source, copy);
1466 /* copy state */
1468 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
1469 copy->strm = dest;
1472 copy->lencode = copy->codes + (state->lencode - state->codes);
1473 copy->distcode = copy->codes + (state->distcode - state->codes);
1475 copy->next = copy->codes + (state->next - state->codes);
1480 copy->window = window;
1481 dest->state = (struct internal_state FAR *)copy;