{"id":17859280,"url":"https://github.com/kanarus/byte_reader","last_synced_at":"2025-12-12T14:09:20.114Z","repository":{"id":195810297,"uuid":"693483616","full_name":"kanarus/byte_reader","owner":"kanarus","description":"A minimal byte-by-byte reader for parsing input","archived":false,"fork":false,"pushed_at":"2024-07-08T21:53:41.000Z","size":43413,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T10:02:36.601Z","etag":null,"topics":["byte","byte-array","bytes","lightweight","minimal","no-std","parse","parser","parsing","reader","simple"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/byte_reader","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/kanarus.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T05:52:35.000Z","updated_at":"2024-07-08T21:52:19.000Z","dependencies_parsed_at":"2024-02-03T07:23:03.795Z","dependency_job_id":"11540104-c7dd-4b9d-bcab-5753d9229532","html_url":"https://github.com/kanarus/byte_reader","commit_stats":null,"previous_names":["kana-rus/byte_reader","kanarus/byte_reader"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kanarus/byte_reader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanarus%2Fbyte_reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanarus%2Fbyte_reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanarus%2Fbyte_reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanarus%2Fbyte_reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanarus","download_url":"https://codeload.github.com/kanarus/byte_reader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanarus%2Fbyte_reader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326308,"owners_count":24232468,"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-08-01T02:00:08.611Z","response_time":67,"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":["byte","byte-array","bytes","lightweight","minimal","no-std","parse","parser","parsing","reader","simple"],"created_at":"2024-10-28T06:42:11.767Z","updated_at":"2025-10-18T19:04:26.772Z","avatar_url":"https://github.com/kanarus.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003ebyte_reader\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA \u003cstrong\u003eminimal\u003c/strong\u003e byte-by-byte reader for parsing input.\u003c/p\u003e\n\n\u003cdiv align=\"right\"\u003e\n    \u003cimg alt=\"test status of byte_reader\" src=\"https://github.com/kana-rus/byte_reader/actions/workflows/test.yml/badge.svg\"/\u003e\n    \u003ca href=\"https://crates.io/crates/byte_reader\"\u003e\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/byte_reader\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Use case\nFollowing situation:\n\n\u003e I want to read and parse some input, but it's **not so large-scale** parsing task, so I'd like to avoid adding a *heavyweight* crate like [nom](https://crates.io/crates/nom) or [nom8](https://crates.io/crates/nom8) to my `dependencies` ...\n\nOf course, `byte_reader` supports *no std* environment.\n\n\u003cbr/\u003e\n\n\u003ch2\u003e\u003ca href=\"https://github.com/kana-rus/byte_reader/blob/main/examples/usage.rs\"\u003eUsage\u003c/a\u003e\u003c/h2\u003e\n\n```rust\nuse byte_reader::Reader;\n\nfn main() {\n    // Get an input `\u0026[u8]` from a File, standard input, or others\n    let sample_input = \"Hello,    byte_reader!\".as_bytes();\n\n    // Create mutable `r` for the input\n    let mut r = Reader::new(sample_input);\n\n    // Use some simple operations\n    // to parse the input\n    r.consume(\"Hello\").unwrap();\n    r.consume(\",\").unwrap();\n    r.skip_whitespace();\n    let name = r.read_while(|b| b != \u0026b'!'); // b\"byte_reader\"\n    let name = String::from_utf8_lossy(name).to_string();\n    r.consume(\"!\").unwrap();\n\n    println!(\"Greeted to `{name}`.\");\n}\n```\n\n\u003cbr/\u003e\n\n## Operations\n- `remaining`\n- `read_while`, `read_until`\n- `next`, `next_if`\n- `peek`, `peek2`, `peek3`\n- `advance_by`, `unwind_by`\n- `consume`, `consume_oneof`\n- `skip_while`, `skip_whitespace`\n\n\u003cbr/\u003e\n\n## Features\n\n### `\"location\"`\n\nEnable tracking reader's location, **line** and **column** (1-origin), in the input bytes.\n\n### `\"text\"`\n\nSome utility methods for text-parsing are available：\n\n- `read_quoted_by`\n- `read_uint`, `read_int`\n- `read_camel`, `read_snake`, `read_kebab`\n\n\u003cbr/\u003e\n\n## License\n`byte_reader` is licensed under the MIT License ([LICENSE](https://github.com/kana-rus/byte_reader/blob/main/LICENSE) or [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT)).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanarus%2Fbyte_reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanarus%2Fbyte_reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanarus%2Fbyte_reader/lists"}