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()
370 local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
401 /* copy state->wsize or less output bytes into the circular window */
402 if (copy >= state->wsize) {
409 if (dist > copy) dist = copy;
410 zmemcpy(state->window + state->wnext, end - copy, dist);
411 copy -= dist;
412 if (copy) {
413 zmemcpy(state->window, end - copy, copy);
414 state->wnext = copy;
588 and there is no window currently, goto inf_leave will create one and copy
610 unsigned copy; /* number of stored or match bytes to copy */
611 unsigned char FAR *from; /* where to copy match bytes from */
614 unsigned len; /* length to copy for repeats, bits to drop */
739 copy = state->length;
740 if (copy > have) copy = have;
741 if (copy) {
747 len + copy > state->head->extra_max ?
748 state->head->extra_max - len : copy);
751 state->check = crc32(state->check, next, copy);
752 have -= copy;
753 next += copy;
754 state->length -= copy;
764 copy = 0;
766 len = (unsigned)(next[copy++]);
771 } while (len && copy < have);
773 state->check = crc32(state->check, next, copy);
774 have -= copy;
775 next += copy;
786 copy = 0;
788 len = (unsigned)(next[copy++]);
793 } while (len && copy < have);
795 state->check = crc32(state->check, next, copy);
796 have -= copy;
797 next += copy;
894 copy = state->length;
895 if (copy) {
896 if (copy > have) copy = have;
897 if (copy > left) copy = left;
898 if (copy == 0) goto inf_leave;
899 zmemcpy(put, next, copy);
900 have -= copy;
901 next += copy;
902 left -= copy;
903 put += copy;
904 state->length -= copy;
972 copy = 3 + BITS(2);
979 copy = 3 + BITS(3);
986 copy = 11 + BITS(7);
989 if (state->have + copy > state->nlen + state->ndist) {
994 while (copy--)
1147 copy = out - left;
1148 if (state->offset > copy) { /* copy from window */
1149 copy = state->offset - copy;
1150 if (copy > state->whave) {
1158 copy -= state->whave;
1159 if (copy > state->length) copy = state->length;
1160 if (copy > left) copy = left;
1161 left -= copy;
1162 state->length -= copy;
1165 } while (--copy);
1170 if (copy > state->wnext) {
1171 copy -= state->wnext;
1172 from = state->window + (state->wsize - copy);
1175 from = state->window + (state->wnext - copy);
1176 if (copy > state->length) copy = state->length;
1177 if (copy > left) copy = left;
1178 put = chunkcopy_safe(put, from, copy, put + left);
1180 else { /* copy from output */
1181 copy = state->length;
1182 if (copy > left) copy = left;
1183 put = chunkcopy_lapped_safe(put, state->offset, copy, put + left);
1185 left -= copy;
1186 state->length -= copy;
1321 /* copy dictionary */
1353 /* copy dictionary to window using updatewindow(), which will amend the
1476 struct inflate_state FAR *copy;
1486 copy = (struct inflate_state FAR *)
1488 if (copy == Z_NULL) return Z_MEM_ERROR;
1495 ZFREE(source, copy);
1500 /* copy state */
1502 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
1503 copy->strm = dest;
1506 copy->lencode = copy->codes + (state->lencode - state->codes);
1507 copy->distcode = copy->codes + (state->distcode - state->codes);
1509 copy->next = copy->codes + (state->next - state->codes);
1514 copy->window = window;
1515 dest->state = (struct internal_state FAR *)copy;