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

Function send_bits

Picviewer CE+/dist.user.js:10566–10576  ·  view source on GitHub ↗
(s, value, length)

Source from the content-addressed store, hash-verified

10564 * IN assertion: length <= 16 and value fits in length bits.
10565 */
10566function send_bits(s, value, length) {
10567 if (s.bi_valid > (Buf_size - length)) {
10568 s.bi_buf |= (value << s.bi_valid) & 0xffff;
10569 put_short(s, s.bi_buf);
10570 s.bi_buf = value >> (Buf_size - s.bi_valid);
10571 s.bi_valid += length - Buf_size;
10572 } else {
10573 s.bi_buf |= (value << s.bi_valid) & 0xffff;
10574 s.bi_valid += length;
10575 }
10576}
10577
10578
10579function send_code(s, c, tree) {

Callers 7

send_codeFunction · 0.70
compress_blockFunction · 0.70
send_treeFunction · 0.70
send_all_treesFunction · 0.70
_tr_stored_blockFunction · 0.70
_tr_alignFunction · 0.70
_tr_flush_blockFunction · 0.70

Calls 1

put_shortFunction · 0.70

Tested by

no test coverage detected