MCPcopy
hub / github.com/zxing-js/library / appendBit

Method appendBit

src/core/common/BitArray.ts:244–250  ·  view source on GitHub ↗
(bit: boolean)

Source from the content-addressed store, hash-verified

242 }
243
244 public appendBit(bit: boolean): void {
245 this.ensureCapacity(this.size + 1);
246 if (bit) {
247 this.bits[Math.floor(this.size / 32)] |= 1 << (this.size & 0x1F);
248 }
249 this.size++;
250 }
251
252 /**
253 * Appends the least-significant bits, from value, in order from most-significant to

Callers 5

appendBitsMethod · 0.95
appendBitArrayMethod · 0.95
toBitArrayFunction · 0.95
terminateBitsMethod · 0.80
BitVector.spec.tsFile · 0.80

Calls 1

ensureCapacityMethod · 0.95

Tested by 1

toBitArrayFunction · 0.76