bun-memory 1.0.1 → 1.0.2
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/README.md +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,12 +58,16 @@ const myView = new BigUint64Array(myScratch.buffer, myScratch.byteOffset, 0xf000
|
|
|
58
58
|
|
|
59
59
|
while (true) {
|
|
60
60
|
memory.readInto(myAddress, myScratch); // Updates myView with no new allocations…
|
|
61
|
+
|
|
62
|
+
// …or…
|
|
63
|
+
|
|
64
|
+
memory.readBuffer(myAddress, 0xf000, myScratch); // Also updates myView with no new allocations…
|
|
61
65
|
}
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
```ts
|
|
65
|
-
const myScratch = Buffer.allocUnsafe(
|
|
66
|
-
const myValue = memory.readString(myAddress, myScratch);
|
|
69
|
+
const myScratch = Buffer.allocUnsafe(0x100);
|
|
70
|
+
const myValue = memory.readString(myAddress, 0x100, myScratch);
|
|
67
71
|
```
|
|
68
72
|
|
|
69
73
|
### Notes
|