MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / bit

Method bit

packages/plugins/apps/src/git-client/packfile.ts:112–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 this.pos = pos;
111 }
112 bit(): number {
113 if (this.bitCnt === 0) {
114 requireAvailable(this.buf, this.pos, 1, "deflate stream");
115 this.bitBuf = this.buf[this.pos++];
116 this.bitCnt = 8;
117 }
118 const b = this.bitBuf & 1;
119 this.bitBuf >>= 1;
120 this.bitCnt--;
121 return b;
122 }
123 bits(n: number): number {
124 let v = 0;
125 for (let i = 0; i < n; i++) v |= this.bit() << i;

Callers 3

bitsMethod · 0.95
inflateRawFunction · 0.95
decodeSymFunction · 0.80

Calls 1

requireAvailableFunction · 0.85

Tested by

no test coverage detected