bumparena 0.9.0 → 0.9.1

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 CHANGED
@@ -53,12 +53,14 @@ yarn add bumparena
53
53
 
54
54
  ## Quick Start
55
55
 
56
+ for more Advanced Usages go to [test/example.ts](https://github.com/eugen252009/BumpArena/blob/main/test/example.ts)
57
+
56
58
  ```ts
57
59
  import { Arena } from "bumparena";
58
60
  import fs from "node:fs";
59
61
 
60
62
  // 1. Initialize (e.g., 1GB Arena)
61
- const arena = new Arena({ initalSize: 1024 * 1024 * 1024 });
63
+ const arena = new Arena({ initialSize: 1024 * 1024 * 1024 });
62
64
 
63
65
  // 2. Map data instantly (Zero-Copy)
64
66
  const data = new Uint8Array([10, 20, 30, 40]);
@@ -74,7 +76,7 @@ fs.writeFileSync("database.bin", arena.getBuffer());
74
76
  // 5. Reload (Zero Parsing Time)
75
77
  // Simply load the bytes back into a new Arena buffer
76
78
  const savedData = fs.readFileSync("database.bin");
77
- const restoredArena = new Arena({ initalSize: savedData.byteLength });
79
+ const restoredArena = new Arena({ initialSize: savedData.byteLength });
78
80
  restoredArena.putBytes(savedData); // Structure is restored instantly
79
81
 
80
82
  //Clear your Arena, if you want a restart
package/interface.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type ArenaLocation = bigint & { readonly __data_pointer: unique symbol };
2
2
  export interface ArenaOptions {
3
- initalSize?: number
3
+ initialSize?: number
4
4
  littleEndian?: boolean
5
5
  allignment?: 8 | 16 | 32 | 64
6
6
  bucketOffsets?: number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bumparena",
3
- "version":"0.9.0",
3
+ "version":"0.9.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/arena.js",