{"id":22369862,"url":"https://github.com/zeozeozeo/rwtypes","last_synced_at":"2025-03-26T16:24:08.083Z","repository":{"id":194248205,"uuid":"690599171","full_name":"zeozeozeo/rwtypes","owner":"zeozeozeo","description":"Adds methods to read/write binary numbers to the Read and Write traits.","archived":false,"fork":false,"pushed_at":"2023-09-12T13:57:54.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T08:47:30.090Z","etag":null,"topics":["binary","file","file-io","filesystem","filesystems","io","number","numbers","read","reader","rust","rust-patterns","utils-library","write","writer"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rwtypes","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeozeozeo.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}},"created_at":"2023-09-12T13:57:51.000Z","updated_at":"2023-09-12T13:59:26.000Z","dependencies_parsed_at":"2023-09-12T14:37:26.200Z","dependency_job_id":"64bea64d-4fdb-4d37-b0f3-9952fd27931d","html_url":"https://github.com/zeozeozeo/rwtypes","commit_stats":null,"previous_names":["zeozeozeo/rwtypes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frwtypes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frwtypes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frwtypes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frwtypes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeozeozeo","download_url":"https://codeload.github.com/zeozeozeo/rwtypes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245690220,"owners_count":20656547,"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":["binary","file","file-io","filesystem","filesystems","io","number","numbers","read","reader","rust","rust-patterns","utils-library","write","writer"],"created_at":"2024-12-04T19:29:30.490Z","updated_at":"2025-03-26T16:24:08.060Z","avatar_url":"https://github.com/zeozeozeo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adds methods to read/write binary numbers to the `Read` and `Write` traits.\n\nThis is a simple crate that adds methods like `read_u8`, `read_u32_le`, `read_u64_be`, `write_i128_le`, `write_u16_be`, ... to the Rust [Read](https://doc.rust-lang.org/std/io/trait.Read.html) and [Write](https://doc.rust-lang.org/std/io/trait.Write.html) traits.\n\nThe `impl` feature includes the implementations for the WriterTypes and ReaderTypes traits. It is enabled by default.\n\n# Example\n\n### Reading\n\n```rust\n// read u32 (4 bytes) from a file in little endian.\nlet num = f.read_u32_le().unwrap();\n```\n\n```rust\n// read i64 (8 bytes) from a file in big endian.\nlet num = f.read_i64_be().unwrap();\n```\n\n### Writing\n\n```rust\n// write u32 (4 bytes) to a file in little endian.\nlet num = f.write_u32_le(0xdeadbeef).unwrap();\n```\n\n```rust\n// write i128 (16 bytes) to a file in big endian.\nlet num = f.write_i64_be(12345).unwrap();\n```\n\nThis works with any type that implements [Read](https://doc.rust-lang.org/std/io/trait.Read.html) or [Write](https://doc.rust-lang.org/std/io/trait.Write.html).\n\n# License\n\nPublic domain (Unlicense)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Frwtypes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeozeozeo%2Frwtypes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Frwtypes/lists"}