MCPcopy Create free account
hub / github.com/hoothin/UserScripts / flush_pending

Function flush_pending

Picviewer CE+/dist.user.js:6276–6295  ·  view source on GitHub ↗
(strm)

Source from the content-addressed store, hash-verified

6274 * (See also read_buf()).
6275 */
6276function flush_pending(strm) {
6277 var s = strm.state;
6278
6279 //_tr_flush_bits(s);
6280 var len = s.pending;
6281 if (len > strm.avail_out) {
6282 len = strm.avail_out;
6283 }
6284 if (len === 0) { return; }
6285
6286 utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
6287 strm.next_out += len;
6288 s.pending_out += len;
6289 strm.total_out += len;
6290 strm.avail_out -= len;
6291 s.pending -= len;
6292 if (s.pending === 0) {
6293 s.pending_out = 0;
6294 }
6295}
6296
6297
6298function flush_block_only(s, last) {

Callers 2

flush_block_onlyFunction · 0.70
deflateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected