Lines Matching refs:copy

13  * version 2 for more details (a copy is included in the LICENSE file that
16 * You should have received a copy of the GNU General Public License version
44 * - Unroll direct copy to three copies per loop in inffast.c
61 * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
70 * - Unroll last copy for window match in inflate_fast()
352 unsigned copy, dist;
371 /* copy state->wsize or less output bytes into the circular window */
372 copy = out - strm->avail_out;
373 if (copy >= state->wsize) {
380 if (dist > copy) dist = copy;
381 zmemcpy(state->window + state->write, strm->next_out - copy, dist);
382 copy -= dist;
383 if (copy) {
384 zmemcpy(state->window, strm->next_out - copy, copy);
385 state->write = copy;
564 and there is no window currently, goto inf_leave will create one and copy
589 unsigned copy; /* number of stored or match bytes to copy */
590 unsigned char FAR *from; /* where to copy match bytes from */
593 unsigned len; /* length to copy for repeats, bits to drop */
706 copy = state->length;
707 if (copy > have) copy = have;
708 if (copy) {
713 len + copy > state->head->extra_max ?
714 state->head->extra_max - len : copy);
717 state->check = crc32(state->check, next, copy);
718 have -= copy;
719 next += copy;
720 state->length -= copy;
729 copy = 0;
731 len = (unsigned)(next[copy++]);
736 } while (len && copy < have);
738 state->check = crc32(state->check, next, copy);
739 have -= copy;
740 next += copy;
750 copy = 0;
752 len = (unsigned)(next[copy++]);
757 } while (len && copy < have);
759 state->check = crc32(state->check, next, copy);
760 have -= copy;
761 next += copy;
845 copy = state->length;
846 if (copy) {
847 if (copy > have) copy = have;
848 if (copy > left) copy = left;
849 if (copy == 0) goto inf_leave;
850 zmemcpy(put, next, copy);
851 have -= copy;
852 next += copy;
853 left -= copy;
854 put += copy;
855 state->length -= copy;
922 copy = 3 + BITS(2);
929 copy = 3 + BITS(3);
936 copy = 11 + BITS(7);
939 if (state->have + copy > state->nlen + state->ndist) {
944 while (copy--)
1072 copy = out - left;
1073 if (state->offset > copy) { /* copy from window */
1074 copy = state->offset - copy;
1075 if (copy > state->write) {
1076 copy -= state->write;
1077 from = state->window + (state->wsize - copy);
1080 from = state->window + (state->write - copy);
1081 if (copy > state->length) copy = state->length;
1083 else { /* copy from output */
1085 copy = state->length;
1087 if (copy > left) copy = left;
1088 left -= copy;
1089 state->length -= copy;
1092 } while (--copy);
1215 /* copy dictionary to window */
1352 struct inflate_state FAR *copy;
1363 copy = (struct inflate_state FAR *)
1365 if (copy == Z_NULL) return Z_MEM_ERROR;
1371 ZFREE(source, copy);
1376 /* copy state */
1378 zmemcpy(copy, state, sizeof(struct inflate_state));
1381 copy->lencode = copy->codes + (state->lencode - state->codes);
1382 copy->distcode = copy->codes + (state->distcode - state->codes);
1384 copy->next = copy->codes + (state->next - state->codes);
1389 copy->window = window;
1390 dest->state = (struct internal_state FAR *)copy;