{"id":25908226,"url":"https://github.com/bonnyad9/bny.rawbytes","last_synced_at":"2025-07-13T19:08:47.931Z","repository":{"id":63311486,"uuid":"528525602","full_name":"BonnyAD9/Bny.RawBytes","owner":"BonnyAD9","description":"C# library for converting from and to binary data using attributes.","archived":false,"fork":false,"pushed_at":"2023-01-26T21:47:43.000Z","size":446,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T07:17:18.256Z","etag":null,"topics":["attributes","binary-data","csharp","csharp-library","library"],"latest_commit_sha":null,"homepage":"https://bonnyad9.github.io/Bny.RawBytes/","language":"C#","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/BonnyAD9.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}},"created_at":"2022-08-24T17:26:07.000Z","updated_at":"2022-12-03T21:30:12.000Z","dependencies_parsed_at":"2023-02-15T01:00:33.783Z","dependency_job_id":null,"html_url":"https://github.com/BonnyAD9/Bny.RawBytes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BonnyAD9/Bny.RawBytes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2FBny.RawBytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2FBny.RawBytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2FBny.RawBytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2FBny.RawBytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BonnyAD9","download_url":"https://codeload.github.com/BonnyAD9/Bny.RawBytes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2FBny.RawBytes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265191293,"owners_count":23725292,"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":["attributes","binary-data","csharp","csharp-library","library"],"created_at":"2025-03-03T07:17:21.600Z","updated_at":"2025-07-13T19:08:47.901Z","avatar_url":"https://github.com/BonnyAD9.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bny.RawBytes\nC# library for converting from and to bytes. Without the boring repetition.\n\n## In this repository\n- **Bny.RawBytes:** the library\n- **Bny.RawBytes.Tester:** unit tests\n\n## How to use\n\n### Code\n\n```csharp\nusing Bny.RawBytes;\n\nvar arr = new byte[] { 0, 2, 0, 0, 0, 2, 0, 0 };\n\n// convert bytes (arr) to BinaryTest, the default byte order will be big-endian\nConsole.WriteLine(Bytes.To\u003cBinaryTest\u003e(arr, Endianness.Big));\n\n[BinaryObject] // mark this as binary object\nclass BinaryTest\n{\n    // properties and fields with the BinaryMember attribute\n    // will be readed in the same order in which they are written in code\n    // or you can specify your own order with the Order property\n\n    // Width will be readed first and always in little endian byte order\n    [BinaryMember(endianness: Endianness.Little)]\n    public int Width { get; init; }\n\n    // Second will be readed height in the default byte order (big-endian in this case)\n    [BinaryMember]\n    public int Height { get; init; }\n    \n    // members without the attribute are ignored\n    public int Size =\u003e Width * Height;\n\n    public override string ToString() =\u003e $\"[{Size}({Width} * {Height})]\";\n}\n```\n\n### Output\n\n```\n[67108864(512 * 131072)]\n```\n\n## How to get it\n- This library is available as [NuGet Package](https://www.nuget.org/packages/Bny.RawBytes/)\n\n## Links\n- **Author:** [BonnyAD9](https://github.com/BonnyAD9)\n- **GitHub repository:** [Bny.RawBytes](https://github.com/BonnyAD9/Bny.RawBytes)\n- **Documentation:** [Doxygen](https://bonnyad9.github.io/Bny.RawBytes/)\n- **My Website:** [bonnyad9.github.io](https://bonnyad9.github.io/)\n- **NuGetPackage:** [Bny.RawBytes](https://www.nuget.org/packages/Bny.RawBytes/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonnyad9%2Fbny.rawbytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonnyad9%2Fbny.rawbytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonnyad9%2Fbny.rawbytes/lists"}