{"id":17120676,"url":"https://github.com/zeenix/endi","last_synced_at":"2025-04-13T04:52:50.718Z","repository":{"id":211761813,"uuid":"729862980","full_name":"zeenix/endi","owner":"zeenix","description":"A simple endian-handling library for Rust","archived":false,"fork":false,"pushed_at":"2023-12-12T12:28:37.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T04:52:45.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zeenix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-10T15:35:27.000Z","updated_at":"2023-12-11T12:24:45.000Z","dependencies_parsed_at":"2023-12-10T18:41:15.288Z","dependency_job_id":null,"html_url":"https://github.com/zeenix/endi","commit_stats":null,"previous_names":["zeenix/endi"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeenix%2Fendi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeenix%2Fendi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeenix%2Fendi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeenix%2Fendi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeenix","download_url":"https://codeload.github.com/zeenix/endi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665767,"owners_count":21142123,"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":[],"created_at":"2024-10-14T18:00:27.689Z","updated_at":"2025-04-13T04:52:50.701Z","avatar_url":"https://github.com/zeenix.png","language":"Rust","readme":"# endi\n\n[![Build Status](https://github.com/zeenix/endi/actions/workflows/rust.yml/badge.svg)](https://github.com/zeenix/endi/actions/workflows/rust.yml) [![API Documentation](https://docs.rs/endi/badge.svg)](https://docs.rs/endi/) [![crates.io](https://img.shields.io/crates/v/endi)](https://crates.io/crates/endi)\n\nYet another endian handling library for Rust. The approach is very similar to that of\n`byteordered` crate with its `Endianness` enum, except that `endi` is much simpler and doesn't\ndepend on `byteorder` (or anything at all).\n\n## Usage\n\nThe main type is `Endian` enum which can be either `Big` or `Little`. It provides various \nmethods to read and write integers of different sizes and endianness.\n\n```rust\nuse endi::{Endian, ReadBytes, WriteBytes};\n\nlet mut buf = [0u8; 4];\nfor endian in [Endian::Little, Endian::Big] {\n    endian.write_u32(\u0026mut buf, 0xAB_BA_FE_EF);\n    assert_eq!(endian.read_u32(\u0026buf), 0xAB_BA_FE_EF);\n\n    // Using the `ReadBytes` and `WriteBytes` traits:\n    let mut cursor = std::io::Cursor::new(\u0026mut buf[..]);\n    cursor.write_u32(endian, 0xAB_BA_FE_EF).unwrap();\n    cursor.set_position(0);\n    assert_eq!(cursor.read_u32(endian).unwrap(), 0xAB_BA_FE_EF);\n}\n```\n\n## nostd\n\nYou can disable `std` by disabling the default `std` feature. This will disable the `ReadBytes` and\n`WriteBytes` traits.\n\n## License\n\n[MIT](LICENSE-MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeenix%2Fendi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeenix%2Fendi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeenix%2Fendi/lists"}