{"id":51509519,"url":"https://github.com/murphsicles/byteorder","last_synced_at":"2026-07-08T04:30:57.975Z","repository":{"id":358482291,"uuid":"1240888697","full_name":"murphsicles/byteorder","owner":"murphsicles","description":"Reading and writing integers in big-endian and little-endian byte order","archived":false,"fork":false,"pushed_at":"2026-05-17T15:13:16.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T17:31:06.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/murphsicles.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T17:39:16.000Z","updated_at":"2026-05-17T15:13:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/murphsicles/byteorder","commit_stats":null,"previous_names":["murphsicles/byteorder"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/murphsicles/byteorder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbyteorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbyteorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbyteorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbyteorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murphsicles","download_url":"https://codeload.github.com/murphsicles/byteorder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbyteorder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35252324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","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":[],"created_at":"2026-07-08T04:30:56.963Z","updated_at":"2026-07-08T04:30:57.963Z","avatar_url":"https://github.com/murphsicles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# @io/byteorder 🔄\n\n\u003e **Reading and writing integers in big-endian and little-endian byte order** for Zeta.\n\nPort of the Rust [`byteorder`](https://crates.io/crates/byteorder) crate (v1.5.0) to Zeta.\n\n## Why byteorder matters for BSV\n\nBitcoin transactions use **little-endian** encoding throughout — amounts, sequence numbers, locktimes, sizes. Blocks use a mix of big-endian and little-endian. This crate provides the building blocks for reading and writing the integer fields in BSV transaction serialization without manual byte shuffling.\n\n## API\n\n```zeta\n// Read integers from a byte slice (\u0026[u8])\npub trait ReadBytesExt {\n    fn read_u8(\u0026mut self) -\u003e Result\u003cu8\u003e\n    fn read_u16_le(\u0026mut self) -\u003e Result\u003cu16\u003e\n    fn read_u32_le(\u0026mut self) -\u003e Result\u003cu32\u003e\n    fn read_u64_le(\u0026mut self) -\u003e Result\u003cu64\u003e\n    fn read_i32_le(\u0026mut self) -\u003e Result\u003ci32\u003e\n    fn read_i64_le(\u0026mut self) -\u003e Result\u003ci64\u003e\n    fn read_u16_be(\u0026mut self) -\u003e Result\u003cu16\u003e\n    fn read_u32_be(\u0026mut self) -\u003e Result\u003cu32\u003e\n    fn read_u64_be(\u0026mut self) -\u003e Result\u003cu64\u003e\n    fn read_i32_be(\u0026mut self) -\u003e Result\u003ci32\u003e\n    fn read_i64_be(\u0026mut self) -\u003e Result\u003ci64\u003e\n}\n\n// Write integers to a byte vector (Vec\u003cu8\u003e)\npub trait WriteBytesExt {\n    fn write_u8(\u0026mut self, val: u8) -\u003e Result\n    fn write_u16_le(\u0026mut self, val: u16) -\u003e Result\n    fn write_u32_le(\u0026mut self, val: u32) -\u003e Result\n    fn write_u64_le(\u0026mut self, val: u64) -\u003e Result\n    fn write_i32_le(\u0026mut self, val: i32) -\u003e Result\n    fn write_i64_le(\u0026mut self, val: i64) -\u003e Result\n    fn write_u16_be(\u0026mut self, val: u16) -\u003e Result\n    fn write_u32_be(\u0026mut self, val: u32) -\u003e Result\n    fn write_u64_be(\u0026mut self, val: u64) -\u003e Result\n    fn write_i32_be(\u0026mut self, val: i32) -\u003e Result\n    fn write_i64_be(\u0026mut self, val: i64) -\u003e Result\n}\n```\n\n## Examples\n\n```zeta\nlet mut data = \u0026bytes[..]\nlet version = data.read_u32_le()!  // tx version (LE)\nlet inputs_count = data.read_varint()!  // compact size uint\n\nlet mut buf = Vec::\u003cu8\u003e::new()\nbuf.write_u32_le(0x01000000)!  // tx version\nbuf.write_varint(2)!           // number of inputs\n```\n\n## Usage\n\nAdd to your `zorb.toml`:\n\n```toml\n[dependencies]\n\"@io/byteorder\" = \"1.5.0\"\n```\n\n## License\n\nMIT — free for all use, including commercial and BSV infrastructure.\n\n## Dark Factory Integration\n\n`@io/byteorder` is a foundational dependency of **nour** — the Zeta BSV toolkit. Every integer field in transaction serialization flows through this crate. Correct endianness isn't optional in BSV; it's the difference between a valid and an invalid transaction.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fbyteorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurphsicles%2Fbyteorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fbyteorder/lists"}