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