{"id":28636038,"url":"https://github.com/pwmkin/protobuffers","last_synced_at":"2026-05-02T05:36:03.393Z","repository":{"id":295883812,"uuid":"991596620","full_name":"pwmkin/protobuffers","owner":"pwmkin","description":"A lightweight and performant Protocol Buffers (protobuf) encoding and decoding library for JavaScript/TypeScript, providing tools to read, write, and work with protobuf messages efficiently.","archived":false,"fork":false,"pushed_at":"2025-05-27T21:41:46.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-27T21:48:34.617Z","etag":null,"topics":["javascript","library","protobuf","protobufjs","protocol-buffers","serialization","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/protobuffers","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwmkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-05-27T21:41:14.000Z","updated_at":"2025-05-27T21:42:55.000Z","dependencies_parsed_at":"2025-06-02T22:34:19.840Z","dependency_job_id":null,"html_url":"https://github.com/pwmkin/protobuffers","commit_stats":null,"previous_names":["pwmkin/protobuffers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pwmkin/protobuffers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwmkin%2Fprotobuffers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwmkin%2Fprotobuffers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwmkin%2Fprotobuffers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwmkin%2Fprotobuffers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwmkin","download_url":"https://codeload.github.com/pwmkin/protobuffers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwmkin%2Fprotobuffers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259513158,"owners_count":22869565,"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":["javascript","library","protobuf","protobufjs","protocol-buffers","serialization","typescript"],"created_at":"2025-06-12T17:36:47.504Z","updated_at":"2026-05-02T05:36:03.366Z","avatar_url":"https://github.com/pwmkin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Protobuf\n\nA lightweight and performant Protocol Buffers (protobuf) encoding and decoding library for JavaScript/TypeScript, providing tools to read, write, and work with protobuf messages efficiently.\n\n## Features\n\n* Encode and decode protobuf messages with full support for:\n  * Varint, fixed32, fixed64, length-delimited fields\n  * ZigZag encoding for signed integers (sint32/sint64)\n  * Nested messages and packed repeated fields\n* Low-level wire format utilities for protobuf serialization/deserialization\n* `ProtobufReader` for parsing buffers into typed values with safe bounds checks\n* `ProtobufWriter` for writing protobuf-encoded data to buffers\n* Declarative message class generation with `createMessageClass` and `Message` base class\n* Registry to manage protobuf message descriptors and types\n* Fully typed TypeScript support with detailed field and wire type definitions\n\n## Installation\n\n```bash\nnpm install protobuffers\n```\n\nor\n\n```bash\nyarn add protobuffers\n```\n\n## Usage\n\n```ts\nimport { ProtobufReader, ProtobufWriter, createMessageClass, Message } from 'protobuffers';\n\n// Writing a protobuf message\nconst writer = new ProtobufWriter();\nwriter.writeInt32(1, -1);\nwriter.writeString(2, \"Hello, protobuf!\");\nconst buffer = writer.finish();\n\n// Reading a protobuf message\nconst reader = new ProtobufReader(buffer);\nwhile (reader.hasMore()) {\n  const tag = reader.readTag();\n  if (!tag) break;\n\n  switch (tag.fieldNumber) {\n    case 1:\n      const intValue = reader.readInt32();\n      console.log('int32 field:', intValue);\n      break;\n    case 2:\n      const strValue = reader.readString();\n      console.log('string field:', strValue);\n      break;\n    default:\n      reader.skipField(tag.wireType);\n  }\n}\n```\n\n---\n\n## Contributing\n\nContributions and issues are welcome! Please open issues or pull requests.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwmkin%2Fprotobuffers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwmkin%2Fprotobuffers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwmkin%2Fprotobuffers/lists"}