{"id":15046031,"url":"https://github.com/weisrc/sirdez","last_synced_at":"2025-12-11T21:10:20.840Z","repository":{"id":53895529,"uuid":"445666329","full_name":"weisrc/sirdez","owner":"weisrc","description":"Glorious Binary Serialization and Deserialization for TypeScript.","archived":false,"fork":false,"pushed_at":"2025-03-11T02:30:37.000Z","size":2965,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T10:36:47.445Z","etag":null,"topics":["binary","buffer","decoding","deno","encoding","ipc","javascript","marshalling","messsage","msgpack","nodejs","protocol","rpc","serdes","serialization","treeshakable","typescript","web"],"latest_commit_sha":null,"homepage":"https://weisrc.github.io/sirdez/","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/weisrc.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}},"created_at":"2022-01-07T22:16:27.000Z","updated_at":"2025-09-21T18:10:54.000Z","dependencies_parsed_at":"2023-02-10T11:32:58.434Z","dependency_job_id":null,"html_url":"https://github.com/weisrc/sirdez","commit_stats":null,"previous_names":["weisrc/byts"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/weisrc/sirdez","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisrc%2Fsirdez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisrc%2Fsirdez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisrc%2Fsirdez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisrc%2Fsirdez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weisrc","download_url":"https://codeload.github.com/weisrc/sirdez/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisrc%2Fsirdez/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27670275,"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-12-11T02:00:11.302Z","response_time":56,"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":["binary","buffer","decoding","deno","encoding","ipc","javascript","marshalling","messsage","msgpack","nodejs","protocol","rpc","serdes","serialization","treeshakable","typescript","web"],"created_at":"2024-09-24T20:52:36.768Z","updated_at":"2025-12-11T21:10:20.804Z","avatar_url":"https://github.com/weisrc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv markdown=\"1\" align=\"center\"\u003e\n\n[![Sir Dez][logo-badge]][logo-url]\n\n# **Glorious [_SerDes_][serdes] for TypeScript**\n\nThe **library** you can rely on,  \nFor **binary** **serialization** and **deserialization**,  \nIn **Node**, **Deno**, and the **Web** environment,  \nWhich is **simple** and yet **performant**.\n\n[![npm][npm-badge]][npm-url]\n[![deno][deno-badge]][deno-url]\n[![ci][ci-badge]][ci-url]\n[![coverage][coverage-badge]][coverage-url]\n[![report][report-badge]][report-url]\n[![docs][docs-badge]][docs-url]\n[![perf][perf-badge]][perf-url]\n[![bundle][bundle-badge]][bundle-url]\n\n\u003c/div\u003e\n\n## Features\n\n- Performant\n- Easy to use\n- Full TypeScript support\n- Super extensible\n- 99% tree-shakable\n- Zero dependencies (small footprint)\n- Runs in Node, Deno and browsers\n- No `eval()` or `Function()` by default\n- Performant eval mode with `import \"sirdez/eval\"`\n- MessagePack for schemaless data\n- [More details...][design-url]\n\n**Performance Comparison with other tools in Node (ops/sec)**\n\n[![performance][perf-chart]][perf-url]\n\n## Installation\n\nExpand for more details.\n\n\u003cdetails markdodwn=\"1\"\u003e\n  \u003csummary\u003eNode (with or without bundlers)\u003c/summary\u003e\n\n#### In the terminal with NPM\n\n```sh\nnpm i sirdez\n```\n\n#### Or with Yarn\n\n```sh\nyarn add sirdez\n```\n\n#### In the code with ES Modules\n\n```ts\nimport * as sd from \"sirdez\";\n```\n\n#### or with CommonJS\n\n```ts\nconst sd = require(\"sirdez\");\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdodwn=\"1\"\u003e\n\u003csummary\u003eWeb (without bundlers)\u003c/summary\u003e\n\n#### In HTML with UMD\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/sirdez/dist/sirdez.umd.js\"\u003e\u003c/script\u003e\n```\n\n#### In an ES module script (statically)\n\n```js\nimport * as sd from \"https://cdn.jsdelivr.net/npm/sirdez/dist/sirdez.es.js\";\n```\n\n#### In an ES module script (dynamically)\n\n```js\nconst sd = await import(\n  \"https://cdn.jsdelivr.net/npm/sirdez/dist/sirdez.es.js\"\n);\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdodwn=\"1\"\u003e\n\u003csummary\u003eDeno\u003c/summary\u003e\n\n#### In code (statically)\n\n```ts\nimport * as sd from \"https://deno.land/x/sirdez/mod.ts\";\n```\n\n#### In code (dynamically)\n\n```ts\nconst sd = await import(\"https://deno.land/x/sirdez/mod.ts\");\n```\n\n\u003c/details\u003e\n\n## Usage\n\n#### Creating a simple SerDes.\n\n```js\nconst person = sd.use(\n  sd.struct({\n    name: sd.string(sd.utf8, sd.uint8),\n    age: sd.uint8\n  })\n);\n\nconst bytes = person.toBytes({\n  name: \"Bob\",\n  age: 23\n});\n\nconst samePerson = person.fromBytes(bytes);\n\nconsole.log({ bytes, samePerson });\n```\n\n#### Using TypeScript utilities\n\n```ts\ntype Person = sd.GetType\u003ctypeof person\u003e;\n\nconst bob: Person = {\n  name: \"Bob\",\n  age: 23\n};\n```\n\n## Roadmap\n\n- Support decorators for schema\n- `msgpack` extension mechanism using classes\n- Better support for protocol buffers\n- Avro-Sirdez schema transpiler\n\n## Known Issues\n\n- `msgpack` becomes very slow for large arrays (help wanted for optimizing it! 🙏)\n\n## Resources\n\n- [Documentation][docs-url]\n- [Coverage Report][coverage-url]\n- [Test Report][report-url]\n- [Performance Report][perf-url]\n- [NPM package][npm-url]\n- [Deno Land][deno-url]\n- [GitHub Action CI][ci-url]\n\n## Contribution\n\nHelp and suggestions are welcomed!\n\n## License\n\nCopyright 2022 Wei (weisrc).\n\nThis software is under the MIT license.\n\nPlease see [LICENSE][license-url] for more information.\n\n\u003c!-- urls --\u003e\n\n[serdes]: https://en.wikipedia.org/wiki/SerDes\n[logo-badge]: https://see.fontimg.com/api/renderfont4/Zd2J/eyJyIjoiZnMiLCJoIjoxMjAsImZnYyI6IiNEQzE0M0MiLCJ0IjoxfQ/U2lyIERleg/x.png\n[logo-url]: https://weisrc.github.io/sirdez\n[ci-badge]: https://github.com/weisrc/sirdez/actions/workflows/ci.yml/badge.svg\n[ci-url]: https://github.com/weisrc/sirdez/actions/workflows/ci.yml\n[npm-badge]: https://img.shields.io/npm/v/sirdez?color=cb3837\u0026label=npm\u0026logo=npm\n[npm-url]: https://www.npmjs.com/package/sirdez\n[deno-badge]: https://img.shields.io/github/v/release/weisrc/sirdez?color=white\u0026include_prereleases\u0026label=deno\u0026logo=deno\n[deno-url]: https://deno.land/x/sirdez\n[coverage-badge]: https://img.shields.io/endpoint?url=https://weisrc.github.io/sirdez/badges/coverage.json\n[coverage-url]: https://weisrc.github.io/sirdez/coverage/lcov-report\n[report-badge]: https://img.shields.io/endpoint?url=https://weisrc.github.io/sirdez/badges/report.json\n[report-url]: https://weisrc.github.io/sirdez/report\n[perf-badge]: https://img.shields.io/endpoint?url=https://weisrc.github.io/sirdez/badges/perf.json\n[perf-chart]: https://weisrc.github.io/sirdez/perf/main.png\n[perf-url]: https://weisrc.github.io/sirdez/performance\n[docs-badge]: https://img.shields.io/badge/docs-vuepress-41B883?logo=readthedocs\n[docs-url]: https://weisrc.github.io/sirdez\n[design-url]: https://weisrc.github.io/sirdez/design\n[bundle-badge]: https://img.shields.io/bundlephobia/minzip/sirdez\n[bundle-url]: https://bundlephobia.com/package/sirdez\n[license-url]: https://github.com/weisrc/sirdez/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisrc%2Fsirdez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweisrc%2Fsirdez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisrc%2Fsirdez/lists"}