{"id":16377321,"url":"https://github.com/electroid/bytebuf","last_synced_at":"2025-08-25T03:38:08.586Z","repository":{"id":57192095,"uuid":"335181104","full_name":"Electroid/bytebuf","owner":"Electroid","description":"A byte buffer for encoding and decoding binary data in JavaScript.","archived":false,"fork":false,"pushed_at":"2024-02-10T07:56:27.000Z","size":97,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T23:07:58.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Electroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-02-02T05:40:03.000Z","updated_at":"2025-04-10T16:14:52.000Z","dependencies_parsed_at":"2024-10-28T09:25:17.559Z","dependency_job_id":null,"html_url":"https://github.com/Electroid/bytebuf","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"567f269465bea5d6337f32b8fc6dc09e136f50b9"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Electroid/bytebuf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electroid%2Fbytebuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electroid%2Fbytebuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electroid%2Fbytebuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electroid%2Fbytebuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Electroid","download_url":"https://codeload.github.com/Electroid/bytebuf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Electroid%2Fbytebuf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262739438,"owners_count":23356726,"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","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":[],"created_at":"2024-10-11T03:42:54.171Z","updated_at":"2025-06-30T08:34:29.462Z","avatar_url":"https://github.com/Electroid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bytebuf\n![npm](https://img.shields.io/npm/v/bytebuf)\n\nA byte buffer for encoding and decoding binary data in JavaScript. Supports the major web browsers, NodeJS, Deno, and Cloudflare Workers.\n\n# Install\n\n```sh\nnpm i bytebuf\n```\n\n# Usage\n\n```js\nimport { ByteBuf } from \"bytebuf\"\n\nconst data = new Uint8Array(1024)\nconst buffer = ByteBuf.from(data)\n\nbuffer.writeInt32(16)\nbuffer.writeString(\"Encoding is fun!\")\nbuffer.setInt16(4, 25924, true)\nbuffer.writeVarInt(49)\n\nconsole.log(buffer.byteOffset) // 21\nbuffer.reset()\n\nconst byteLength = buffer.readInt32() // 16\nconsole.log(buffer.readString(byteLength)) // \"Decoding is fun!\"\nconsole.log(buffer.getVarInt(20)) // { value: 49, byteLength: 1 }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectroid%2Fbytebuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectroid%2Fbytebuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectroid%2Fbytebuf/lists"}