{"id":17032577,"url":"https://github.com/andylokandy/byte","last_synced_at":"2025-08-20T16:31:49.289Z","repository":{"id":45047940,"uuid":"94241895","full_name":"andylokandy/byte","owner":"andylokandy","description":"A low-level, zero-copy, panic-free, binary serializer and deserializer. (parser and encoder)","archived":false,"fork":false,"pushed_at":"2024-02-10T23:28:31.000Z","size":60,"stargazers_count":42,"open_issues_count":7,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-09T16:45:08.211Z","etag":null,"topics":["byte","no-std","parse","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/andylokandy.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":"2017-06-13T17:56:17.000Z","updated_at":"2024-08-28T03:09:03.000Z","dependencies_parsed_at":"2024-11-07T13:01:06.285Z","dependency_job_id":"9936381b-0f01-4576-9354-a7cf9bed36a9","html_url":"https://github.com/andylokandy/byte","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":0.09999999999999998,"last_synced_commit":"f827c50710557b216f8e6aa18fc8ebdcfed02963"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylokandy%2Fbyte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylokandy%2Fbyte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylokandy%2Fbyte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylokandy%2Fbyte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andylokandy","download_url":"https://codeload.github.com/andylokandy/byte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230438185,"owners_count":18225870,"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":["byte","no-std","parse","rust"],"created_at":"2024-10-14T08:29:16.662Z","updated_at":"2024-12-19T13:07:39.430Z","avatar_url":"https://github.com/andylokandy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Byte`\n\n[![build status](https://travis-ci.org/andylokandy/byte.svg?branch=master)](https://travis-ci.org/andylokandy/byte)\n[![crates.io](https://img.shields.io/crates/v/byte.svg)](https://crates.io/crates/byte)\n[![docs.rs](https://docs.rs/byte/badge.svg)](https://docs.rs/byte)\n\nA low-level, zero-copy and panic-free binary serializer and deserializer.\n\n### [**Documentation**](https://docs.rs/byte)\n\n## Usage\n\nAdd the following to your `Cargo.toml`:\n```toml\n[dependencies]\nbyte = \"0.2\"\n```\n\n`Byte` is a `no_std` library; it can be used in any `#![no_std]` situation or crate.\n\n\n# Overview\n\n`Byte` is designed to encode or decode binary data in a fast and low-level way.\nA classical use case is I2C communication en/decoding.\n\n`Byte` provides two core traits `TryRead` and `TryWrite`.\nTypes that implement these traits can be serialized into or deserialized from byte slices.\n\nThe library is meant to be simple, and it will always be.\n\n\n# Example\n\n```rust\nuse byte::*;\n\nlet bytes: \u0026[u8] = \u0026[0xde, 0xad, 0xbe, 0xef];\n\nlet offset = \u0026mut 0;\nlet num = bytes.read_with::\u003cu32\u003e(offset, BE).unwrap();\nassert_eq!(num, 0xdeadbeef);\nassert_eq!(*offset, 4);\n```\n\n```rust\nuse byte::*;\nuse byte::ctx::{Str, NULL};\n\nlet bytes: \u0026[u8] = b\"hello, world!\\0dump\";\n\nlet offset = \u0026mut 0;\nlet str = bytes.read_with::\u003c\u0026str\u003e(offset, Str::Delimiter(NULL)).unwrap();\nassert_eq!(str, \"hello, world!\");\nassert_eq!(*offset, 14);\n```\n\n\n## Contribution\n\nAll kinds of contribution are welcomed.\n\n- **Issues.** Feel free to open an issue when you find typos, bugs, or have any question.\n- **Pull requests.** New collection, better implementation, more tests, more documents and typo fixes are all welcomed.\n\n\n## License\n\nLicensed under MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylokandy%2Fbyte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandylokandy%2Fbyte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylokandy%2Fbyte/lists"}