bun-memory 1.0.0 → 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.
Files changed (2) hide show
  1. package/README.md +7 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -18,7 +18,7 @@ bun add bun-memory
18
18
  ### Basic example
19
19
 
20
20
  ```ts
21
- import Memory from './Memory';
21
+ import Memory from 'bun-memory';
22
22
 
23
23
  const memory = new Memory('strounter-cike.exe');
24
24
 
@@ -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(0x256);
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
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "url": "git://github.com/obscuritysrl/bun-memory.git"
23
23
  },
24
24
  "type": "module",
25
- "version": "1.0.0",
25
+ "version": "1.0.2",
26
26
  "main": "./index.ts",
27
27
  "keywords": [
28
28
  "bun",