• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/zlib/

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()
98 unsigned copy));
396 local int updatewindow(strm, end, copy)
399 unsigned copy;
421 /* copy state->wsize or less output bytes into the circular window */
422 if (copy >= state->wsize) {
429 if (dist > copy) dist = copy;
430 zmemcpy(state->window + state->wnext, end - copy, dist);
431 copy -= dist;
432 if (copy) {
433 zmemcpy(state->window, end - copy, copy);
434 state->wnext = copy;
608 and there is no window currently, goto inf_leave will create one and copy
633 unsigned copy; /* number of stored or match bytes to copy */
634 unsigned char FAR *from; /* where to copy match bytes from */
637 unsigned len; /* length to copy for repeats, bits to drop */
758 copy = state->length;
759 if (copy > have) copy = have;
760 if (copy) {
765 len + copy > state->head->extra_max ?
766 state->head->extra_max - len : copy);
769 state->check = crc32(state->check, next, copy);
770 have -= copy;
771 next += copy;
772 state->length -= copy;
781 copy = 0;
783 len = (unsigned)(next[copy++]);
788 } while (len && copy < have);
790 state->check = crc32(state->check, next, copy);
791 have -= copy;
792 next += copy;
802 copy = 0;
804 len = (unsigned)(next[copy++]);
809 } while (len && copy < have);
811 state->check = crc32(state->check, next, copy);
812 have -= copy;
813 next += copy;
904 copy = state->length;
905 if (copy) {
906 if (copy > have) copy = have;
907 if (copy > left) copy = left;
908 if (copy == 0) goto inf_leave;
909 zmemcpy(put, next, copy);
910 have -= copy;
911 next += copy;
912 left -= copy;
913 put += copy;
914 state->length -= copy;
980 copy = 3 + BITS(2);
987 copy = 3 + BITS(3);
994 copy = 11 + BITS(7);
997 if (state->have + copy > state->nlen + state->ndist) {
1002 while (copy--)
1148 copy = out - left;
1149 if (state->offset > copy) { /* copy from window */
1150 copy = state->offset - copy;
1151 if (copy > state->whave) {
1159 copy -= state->whave;
1160 if (copy > state->length) copy = state->length;
1161 if (copy > left) copy = left;
1162 left -= copy;
1163 state->length -= copy;
1166 } while (--copy);
1171 if (copy > state->wnext) {
1172 copy -= state->wnext;
1173 from = state->window + (state->wsize - copy);
1176 from = state->window + (state->wnext - copy);
1177 if (copy > state->length) copy = state->length;
1179 else { /* copy from output */
1181 copy = state->length;
1183 if (copy > left) copy = left;
1184 left -= copy;
1185 state->length -= copy;
1188 } while (--copy);
1302 /* copy dictionary */
1337 /* copy dictionary to window using updatewindow(), which will amend the
1466 struct inflate_state FAR *copy;
1476 copy = (struct inflate_state FAR *)
1478 if (copy == Z_NULL) return Z_MEM_ERROR;
1484 ZFREE(source, copy);
1489 /* copy state */
1491 zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
1492 copy->strm = dest;
1495 copy->lencode = copy->codes + (state->lencode - state->codes);
1496 copy->distcode = copy->codes + (state->distcode - state->codes);
1498 copy->next = copy->codes + (state->next - state->codes);
1503 copy->window = window;
1504 dest->state = (struct internal_state FAR *)copy;