hypercore 11.0.22 → 11.0.23
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/lib/bit-interlude.js +4 -9
- package/package.json +1 -1
package/lib/bit-interlude.js
CHANGED
|
@@ -123,16 +123,11 @@ module.exports = class BitInterlude {
|
|
|
123
123
|
|
|
124
124
|
const buf = b4a.allocUnsafe(bitfield.getPageByteLength())
|
|
125
125
|
|
|
126
|
-
const view = new DataView(
|
|
127
|
-
buf.buffer,
|
|
128
|
-
buf.byteOffset,
|
|
129
|
-
buf.byteLength
|
|
130
|
-
)
|
|
131
|
-
|
|
132
126
|
if (page) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
const src = page.bitfield // Uint32Array
|
|
128
|
+
buf.set(b4a.from(src.buffer, src.byteOffset, src.byteLength), 0)
|
|
129
|
+
} else {
|
|
130
|
+
b4a.fill(buf, 0)
|
|
136
131
|
}
|
|
137
132
|
|
|
138
133
|
const last = (pageIndex + 1) * (buf.byteLength << 3)
|