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

Function copy_block

Picviewer CE+/dist.user.js:10899–10916  ·  view source on GitHub ↗
(s, buf, len, header)

Source from the content-addressed store, hash-verified

10897 * one's complement if requested.
10898 */
10899function copy_block(s, buf, len, header)
10900//DeflateState *s;
10901//charf *buf; /* the input data */
10902//unsigned len; /* its length */
10903//int header; /* true if block header must be written */
10904{
10905 bi_windup(s); /* align on byte boundary */
10906
10907 if (header) {
10908 put_short(s, len);
10909 put_short(s, ~len);
10910 }
10911// while (len--) {
10912// put_byte(s, *buf++);
10913// }
10914 utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
10915 s.pending += len;
10916}
10917
10918/* ===========================================================================
10919 * Compares to subtrees, using the tree depth as tie breaker when

Callers 1

_tr_stored_blockFunction · 0.70

Calls 2

bi_windupFunction · 0.70
put_shortFunction · 0.70

Tested by

no test coverage detected