MCPcopy Index your code
hub / github.com/RsyncProject/rsync / flush_pending

Function flush_pending

zlib/deflate.c:647–666  ·  view source on GitHub ↗

========================================================================= * Flush as much pending output as possible. All deflate() output goes * through this function so some applications may wish to modify it * to avoid allocating a large strm->next_out buffer and copying into it. * (See also read_buf()). */

Source from the content-addressed store, hash-verified

645 * (See also read_buf()).
646 */
647local void flush_pending(z_streamp strm)
648{
649 unsigned len;
650 deflate_state *s = strm->state;
651
652 _tr_flush_bits(s);
653 len = s->pending;
654 if (len > strm->avail_out) len = strm->avail_out;
655 if (len == 0) return;
656
657 zmemcpy(strm->next_out, s->pending_out, len);
658 strm->next_out += len;
659 s->pending_out += len;
660 strm->total_out += len;
661 strm->avail_out -= len;
662 s->pending -= len;
663 if (s->pending == 0) {
664 s->pending_out = s->pending_buf;
665 }
666}
667
668/* ========================================================================= */
669int ZEXPORT deflate (z_streamp strm, int flush)

Callers 1

deflateFunction · 0.85

Calls 2

_tr_flush_bitsFunction · 0.85
zmemcpyFunction · 0.85

Tested by

no test coverage detected