@dra2020/baseclient 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseclient.js +5 -3
- package/dist/baseclient.js.map +1 -1
- package/lib/util/bitset.ts +6 -3
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -9728,11 +9728,13 @@ const BitLookup = [1, 2, 4, 8, 16, 32, 64, 128];
|
|
|
9728
9728
|
class ListToBitset {
|
|
9729
9729
|
constructor(list) {
|
|
9730
9730
|
this.list = list;
|
|
9731
|
-
this.index = {};
|
|
9732
|
-
this.size = Math.floor((this.list.length + 7) / 8);
|
|
9733
|
-
this.list.forEach((s, i) => { this.index[s] = i; });
|
|
9734
9731
|
}
|
|
9735
9732
|
toBits(l) {
|
|
9733
|
+
if (!this.index) {
|
|
9734
|
+
this.size = Math.floor((this.list.length + 7) / 8);
|
|
9735
|
+
this.index = {};
|
|
9736
|
+
this.list.forEach((s, i) => { this.index[s] = i; });
|
|
9737
|
+
}
|
|
9736
9738
|
let ab = new ArrayBuffer(this.size);
|
|
9737
9739
|
let u8 = new Uint8Array(ab);
|
|
9738
9740
|
if (l)
|