{"id":32445687,"url":"https://github.com/wxn0brp/valtheradb-storage-bin","last_synced_at":"2026-01-20T17:27:59.404Z","repository":{"id":304261392,"uuid":"1018240858","full_name":"wxn0brP/ValtheraDB-storage-bin","owner":"wxn0brP","description":"ValtheraDB Storage in Bin File (One) (WIP)","archived":false,"fork":false,"pushed_at":"2025-10-14T13:28:57.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-19T17:38:00.198Z","etag":null,"topics":["database","db","storage","valthera"],"latest_commit_sha":null,"homepage":"https://npmjs.org/@wxn0brp/db-storage-bin","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wxn0brP.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-11T21:26:54.000Z","updated_at":"2025-10-14T13:29:01.000Z","dependencies_parsed_at":"2025-07-13T18:40:20.941Z","dependency_job_id":"5fb161c8-7b62-4794-b10d-dc1c21a1ae9a","html_url":"https://github.com/wxn0brP/ValtheraDB-storage-bin","commit_stats":null,"previous_names":["wxn0brp/valdb","wxn0brp/valtheradb-plugin-bin","wxn0brp/valtheradb-storage-bin"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/wxn0brP/ValtheraDB-storage-bin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxn0brP%2FValtheraDB-storage-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxn0brP%2FValtheraDB-storage-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxn0brP%2FValtheraDB-storage-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxn0brP%2FValtheraDB-storage-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wxn0brP","download_url":"https://codeload.github.com/wxn0brP/ValtheraDB-storage-bin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxn0brP%2FValtheraDB-storage-bin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281055226,"owners_count":26436350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","db","storage","valthera"],"created_at":"2025-10-26T04:01:12.360Z","updated_at":"2025-10-26T04:02:36.217Z","avatar_url":"https://github.com/wxn0brP.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ValtheraDB Bin Plugin\n\nThe purpose of this experiment is to create a storage layer that allows ValtheraDB, which normally operates on a directory/file structure, to instead use a single binary file for data storage.\n\n## Installation\n\n```bash\nyarn add @wxn0brp/db-storage-bin\n```\n\n## Usage\n\n### Initialization\n\nTo get started, create a new `BinValthera` instance:\n\n```typescript\nimport { createBinValthera } from \"@wxn0brp/db-storage-bin\";\n\nconst { db, actions, mgr } = await createBinValthera(\"test.val\", { preferredSize: 4096 });\n```\n\nThis will create a new binary file named `test.val` (if it doesn't exist) and initialize the database.\n\n### Basic\n\nThe `db` object is an instance of `ValtheraClass` and supports the standard ValtheraDB methods.\n\n### Optimizing the Database\n\nThis will reclaim unused space in the binary file.\n\n```typescript\nawait mgr.optimize();\n```\n\n## API\n\n### `createBinValthera(path, opts, init)`\n\n-   `path`: The path to the binary file.\n-   `opts`: Options for the `BinManager`.\n-   `init`: Whether to initialize the database upon creation (default: `true`).\n\nReturns an object containing:\n-   `db`: An instance of `ValtheraClass`.\n-   `actions`: An instance of `BinFileAction`.\n-   `mgr`: An instance of `BinManager`.\n\n### `BinManager(path, options)`\n\n-   `path`: The path to the binary file.\n-   `options`:\n    -   `preferredSize`: The preferred block size for the database (default: `256`).\n\n## Documentation\n\n- [Data Structure](https://github.com/wxn0brP/ValtheraDB-storage-bin/blob/master/docs/data-structure.md)\n- [ValtheraDB-Core](https://github.com/wxn0brP/ValtheraDB-core)\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxn0brp%2Fvaltheradb-storage-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwxn0brp%2Fvaltheradb-storage-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxn0brp%2Fvaltheradb-storage-bin/lists"}