{"id":23619269,"url":"https://github.com/jkulvich/tobin","last_synced_at":"2026-04-17T05:03:45.923Z","repository":{"id":42808377,"uuid":"269799320","full_name":"jkulvich/tobin","owner":"jkulvich","description":"💻 TypeScript library for binary conversion","archived":false,"fork":false,"pushed_at":"2023-01-07T18:52:36.000Z","size":159,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T21:39:33.042Z","etag":null,"topics":["bin","binary","bytes","casting","int32","javascript","marshaling","serialization","types","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tobin","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/jkulvich.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":"2020-06-05T22:48:20.000Z","updated_at":"2021-09-03T18:25:33.000Z","dependencies_parsed_at":"2023-02-07T21:30:30.229Z","dependency_job_id":null,"html_url":"https://github.com/jkulvich/tobin","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkulvich%2Ftobin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkulvich%2Ftobin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkulvich%2Ftobin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkulvich%2Ftobin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkulvich","download_url":"https://codeload.github.com/jkulvich/tobin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513382,"owners_count":19651323,"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":["bin","binary","bytes","casting","int32","javascript","marshaling","serialization","types","typescript"],"created_at":"2024-12-27T19:48:36.740Z","updated_at":"2025-11-07T00:30:56.393Z","avatar_url":"https://github.com/jkulvich.png","language":"TypeScript","readme":"[![CircleCI](https://circleci.com/gh/jkulvich/tobin.svg)](https://circleci.com/gh/jkulvich/tobin)\n[![Master Version](https://img.shields.io/github/package-json/v/jkulvich/tobin/master.svg?style=flat-square)](https://github.com/jkulvich/tobin)\n[![GitHub](https://img.shields.io/github/license/jkulvich/tobin?style=flat-square)](https://github.com/jkulvich/tobin/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/jkulvich/tobin?style=flat-square)](https://github.com/jkulvich/tobin/issues)\n[![npm](https://img.shields.io/npm/dw/tobin?style=flat-square)](https://www.npmjs.com/package/tobin)\n[![GitHub top language](https://img.shields.io/github/languages/top/jkulvich/tobin?style=flat-square)](https://github.com/jkulvich/tobin)\n\n# :construction: Please, wait for release\nIf you need in stability, please wait for release before use.\nAPI may be change till release.\n\n- [:ru: RUS](./README.ru.md) - Русская документация\n- [:uk: ENG](./README.md) - English documentation\n\n# About\nThis is small and lightweight library for binary conversion written on TypeScript.\nThe library allows creating and parsing binary structures.\n\nOr it can be used as a part of big binary serialization library.  \n(P.S. Coming soon)\n\n# Installation\n:cat2: with **yarn**:  \n`yarn add tobin`\n\n:wrench: with **npm**:  \n`npm i tobin`\n\n# Repo and issues\n:floppy_disk: repo: https://github.com/jkulvich/tobin  \n:speech_balloon: issues: https://github.com/jkulvich/tobin/issues\n\n# Supported types\n\n- [x] Byte\n- [x] SByte\n- [x] Int16\n- [x] UInt16\n- [x] Int32\n- [x] UInt32\n- [ ] Int64 // ES2020 only with BigInt\n- [ ] UInt64 // ES2020 only with BigInt\n- [ ] Float\n- [ ] Double\n- [x] Bool\n- [ ] String\n    - [x] String // Null Terminated String (default)\n    - [x] ShortString // Short String (255 bytes max)\n    - [ ] FixedString // String with fixed size. Null Terminated if less than size\n\n# Examples\n\nFormal:\n```\ntobin.(convert|parse)(S?Byte|U?Int16|U?Int32|U?Int64|Float|Double|Bool|(Short|Fixed)?String)\n```\n\n```javascript\nimport tobin from \"tobin\"\n\ntobin.convertInt32(500) // [0, 0, 1, 244]\ntobin.convertInt32(-500) // [128, 0, 1, 244]\ntobin.convertUInt16(65535) // [255, 255]\ntobin.convertByte(128) // [128]\ntobin.convertString(\"Hello\") // [104, 101, 108, 108, 111, 0]\ntobin.convertShortString(\"Hello\") // [ 5, 104, 101, 108, 108, 111 ]\n\ntobin.parseSByte(new Uint8Array([129])) // -1\ntobin.parseString(new Uint8Array([104, 101, 108, 108, 111, 0])) // \"Hello\"\ntobin.parseShortString(new Uint8Array([5, 104, 101, 108, 108, 111])) // \"Hello\"\n```\n\n# Performance\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkulvich%2Ftobin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkulvich%2Ftobin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkulvich%2Ftobin/lists"}