{"id":29819350,"url":"https://github.com/jacoblightning/prefix_parser","last_synced_at":"2025-07-28T21:11:16.061Z","repository":{"id":303387371,"uuid":"1015308987","full_name":"Jacoblightning/prefix_parser","owner":"Jacoblightning","description":"A rust library to parse binary and SI number prefixes","archived":false,"fork":false,"pushed_at":"2025-07-07T11:00:46.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T11:09:05.283Z","etag":null,"topics":["binary","binary-prefix","parser","prefix","rust","rust-crate","rust-library","si","si-prefixes"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/prefix_parser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jacoblightning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2025-07-07T10:03:31.000Z","updated_at":"2025-07-07T11:00:49.000Z","dependencies_parsed_at":"2025-07-07T11:09:07.642Z","dependency_job_id":"ea2cf921-2c51-4f96-b938-5a8b8aa5cc3a","html_url":"https://github.com/Jacoblightning/prefix_parser","commit_stats":null,"previous_names":["jacoblightning/prefix_parser"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Jacoblightning/prefix_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fprefix_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fprefix_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fprefix_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fprefix_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jacoblightning","download_url":"https://codeload.github.com/Jacoblightning/prefix_parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fprefix_parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585866,"owners_count":24111577,"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-07-28T02:00:09.689Z","response_time":68,"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","binary-prefix","parser","prefix","rust","rust-crate","rust-library","si","si-prefixes"],"created_at":"2025-07-28T21:11:13.541Z","updated_at":"2025-07-28T21:11:16.053Z","avatar_url":"https://github.com/Jacoblightning.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prefix Parser\n\nA parser for numbers with a binary/SI prefix on the end.\n\n# Usage:\n\ncall `prefix_parser::parse_prefixes` with the prefixed number to parse.\n\n```rust\nlet parsed = prefix_parser::parse_prefixes(\"216MiB\")?;\n\n// 226492416 == 1024^2 * 216, so 226492416 is 216MiB\nassert_eq!(parsed, 226492416);\n```\n\n## Things to note:\n\n - If no prefix is specified, the value is just converted to a number and returned.\n - Capitalization is ignored. To differentiate between SI and binary, use `MB` vs `MiB`, `KB` vs `KiB`, etc...\n - If just the first letter is specified, it is assumed to be in binary format (`1k` is 1024, not 1000).\n - All of `b`, `bb`, and `bib` are allowed and valid, although they just keep the number as is.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblightning%2Fprefix_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblightning%2Fprefix_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblightning%2Fprefix_parser/lists"}