Lines Matching refs: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()
368 local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
389 /* copy state->wsize or less output bytes into the circular window */
390 if (copy >= state->wsize) {
397 if (dist > copy) dist = copy;
398 zmemcpy(state->window + state->wnext, end - copy, dist);
399 copy -= dist;
400 if (copy) {
401 zmemcpy(state->window, end - copy, copy);
402 state->wnext = copy;
576 and there is no window currently, goto inf_leave will create one and copy
598 unsigned copy; /* number of stored or match bytes to copy */
599 unsigned char FAR *from; /* where to copy match bytes from */
602 unsigned len; /* length to copy for repeats, bits to drop */
727 copy = state->length;
728 if (copy > have) copy = have;
729 if (copy) {
735 len + copy > state->head->extra_max ?
736 state->head->extra_max - len : copy);
739 state->check = crc32(state->check, next, copy);
740 have -= copy;
741 next += copy;
742 state->length -= copy;
752 copy = 0;
754 len = (unsigned)(next[copy++]);
759 } while (len && copy < have);
761 state->check = crc32(state->check, next, copy);
762 have -= copy;
763 next += copy;
774 copy = 0;
776 len = (unsigned)(next[copy++]);
781 } while (len && copy < have);
783 state->check = crc32(state->check, next, copy);
784 have -= copy;
785 next += copy;
882 copy = state->length;
883 if (copy) {
884 if (copy > have) copy = have;
885 if (copy > left) copy = left;
886 if (copy == 0) goto inf_leave;
887 zmemcpy(put, next, copy);
888 have -= copy;
889 next += copy;
890 left -= copy;
891 put += copy;
892 state->length -= copy;
960 copy = 3 + BITS(2);
967 copy = 3 + BITS(3);
974 copy = 11 + BITS(7);
977 if (state->have + copy > state->nlen + state->ndist) {
982 while (copy--)
1134 copy = out - left;
1135 if (state->offset > copy) { /* copy from window */
1136 copy = state->offset - copy;
1137 if (copy > state->whave) {
1145 copy -= state->whave;
1146 if (copy > state->length) copy = state->length;
1147 if (copy > left) copy = left;
1148 left -= copy;
1149 state->length -= copy;
1152 } while (--copy);
1157 if (copy > state->wnext) {
1158 copy -= state->wnext;
1159 from = state->window + (state->wsize - copy);
1162 from = state->window + (state->wnext - copy);
1163 if (copy > state->length) copy = state->length;
1165 else { /* copy from output */
1167 copy = state->length;
1169 if (copy > left) copy = left;
1170 left -= copy;
1171 state->length -= copy;
1174 } while (--copy);
1286 /* copy dictionary */
1318 /* copy dictionary to window using updatewindow(), which will amend the
1441 struct inflate_state FAR *copy;
1451 copy = (struct inflate_state FAR *)
1453 if (copy == Z_NULL) return Z_MEM_ERROR;
1459 ZFREE(source, copy);
1464 /* copy state */
1466 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
1467 copy->strm = dest;
1470 copy->lencode = copy->codes + (state->lencode - state->codes);
1471 copy->distcode = copy->codes + (state->distcode - state->codes);
1473 copy->next = copy->codes + (state->next - state->codes);
1478 copy->window = window;
1479 dest->state = (struct internal_state FAR *)copy;