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

Method ensureCapacity

src/core/common/BitArray.ts:74–80  ·  view source on GitHub ↗
(size: number /*int*/)

Source from the content-addressed store, hash-verified

72 }
73
74 private ensureCapacity(size: number /*int*/): void {
75 if (size > this.bits.length * 32) {
76 const newBits = BitArray.makeArray(size);
77 System.arraycopy(this.bits, 0, newBits, 0, this.bits.length);
78 this.bits = newBits;
79 }
80 }
81
82 /**
83 * @param i bit to get

Callers 3

appendBitMethod · 0.95
appendBitsMethod · 0.95
appendBitArrayMethod · 0.95

Calls 2

makeArrayMethod · 0.80
arraycopyMethod · 0.80

Tested by

no test coverage detected