Home | History | Annotate | Download | only in 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()
363 unsigned copy, dist;
382 /* copy state->wsize or less output bytes into the circular window */
383 copy = out - strm->avail_out;
384 if (copy >= state->wsize) {
391 if (dist > copy) dist = copy;
392 zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
393 copy -= dist;
394 if (copy) {
395 zmemcpy(state->window, strm->next_out - copy, copy);
396 state->wnext = copy;
575 and there is no window currently, goto inf_leave will create one and copy
600 unsigned copy; /* number of stored or match bytes to copy */
601 unsigned char FAR *from; /* where to copy match bytes from */
604 unsigned len; /* length to copy for repeats, bits to drop */
719 copy = state->length;
720 if (copy > have) copy = have;
721 if (copy) {
726 len + copy > state->head->extra_max ?
727 state->head->extra_max - len : copy);
730 state->check = crc32(state->check, next, copy);
731 have -= copy;
732 next += copy;
733 state->length -= copy;
742 copy = 0;
744 len = (unsigned)(next[copy++]);
749 } while (len && copy < have);
751 state->check = crc32(state->check, next, copy);
752 have -= copy;
753 next += copy;
763 copy = 0;
765 len = (unsigned)(next[copy++]);
770 } while (len && copy < have);
772 state->check = crc32(state->check, next, copy);
773 have -= copy;
774 next += copy;
863 state->mode = COPY;
864 case COPY:
865 copy = state->length;
866 if (copy) {
867 if (copy > have) copy = have;
868 if (copy > left) copy = left;
869 if (copy == 0) goto inf_leave;
870 zmemcpy(put, next, copy);
871 have -= copy;
872 next += copy;
873 left -= copy;
874 put += copy;
875 state->length -= copy;
942 copy = 3 + BITS(2);
949 copy = 3 + BITS(3);
956 copy = 11 + BITS(7);
959 if (state->have + copy > state->nlen + state->ndist) {
964 while (copy--)
1110 copy = out - left;
1111 if (state->offset > copy) { /* copy from window */
1112 copy = state->offset - copy;
1113 if (copy > state->whave) {
1121 copy -= state->whave;
1122 if (copy > state->length) copy = state->length;
1123 if (copy > left) copy = left;
1124 left -= copy;
1125 state->length -= copy;
1128 } while (--copy);
1133 if (copy > state->wnext) {
1134 copy -= state->wnext;
1135 from = state->window + (state->wsize - copy);
1138 from = state->window + (state->wnext - copy);
1139 if (copy > state->length) copy = state->length;
1141 else { /* copy from output */
1143 copy = state->length;
1145 if (copy > left) copy = left;
1146 left -= copy;
1147 state->length -= copy;
1150 } while (--copy);
1274 /* copy dictionary to window */
1411 struct inflate_state FAR *copy;
1422 copy = (struct inflate_state FAR *)
1424 if (copy == Z_NULL) return Z_MEM_ERROR;
1430 ZFREE(source, copy);
1435 /* copy state */
1437 zmemcpy(copy, state, sizeof(struct inflate_state));
1440 copy->lencode = copy->codes + (state->lencode - state->codes);
1441 copy->distcode = copy->codes + (state->distcode - state->codes);
1443 copy->next = copy->codes + (state->next - state->codes);
1448 copy->window = window;
1449 dest->state = (struct internal_state FAR *)copy;
1478 (state->mode == COPY ? state->length :