{"id":22481458,"url":"https://github.com/Bread-Experts-Group/byteflippers","last_synced_at":"2025-10-16T14:30:28.799Z","repository":{"id":247115945,"uuid":"823577292","full_name":"Bread-Experts-Group/byteflippers","owner":"Bread-Experts-Group","description":"Signed/modular types for system, big and little endian reading/writing.","archived":false,"fork":false,"pushed_at":"2025-01-17T06:41:50.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T21:45:43.472Z","etag":null,"topics":["ada","big-endian","byte","endian","flip","little-endian","lsb","msb","swap"],"latest_commit_sha":null,"homepage":"","language":"Ada","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/Bread-Experts-Group.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-03T09:46:43.000Z","updated_at":"2025-01-17T06:41:51.000Z","dependencies_parsed_at":"2025-01-10T11:36:39.671Z","dependency_job_id":null,"html_url":"https://github.com/Bread-Experts-Group/byteflippers","commit_stats":null,"previous_names":["atpstorages/byteflip","bread-experts-group/byteflip"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-Experts-Group%2Fbyteflippers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-Experts-Group%2Fbyteflippers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-Experts-Group%2Fbyteflippers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-Experts-Group%2Fbyteflippers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bread-Experts-Group","download_url":"https://codeload.github.com/Bread-Experts-Group/byteflippers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236724706,"owners_count":19194886,"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":["ada","big-endian","byte","endian","flip","little-endian","lsb","msb","swap"],"created_at":"2024-12-06T16:13:08.549Z","updated_at":"2025-10-16T14:30:28.394Z","avatar_url":"https://github.com/Bread-Experts-Group.png","language":"Ada","funding_links":[],"categories":[],"sub_categories":[],"readme":"# byteflippers\r\n\r\n[![View the Alire Crate](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/byteflippers.json)](https://alire.ada.dev/crates/byteflippers)\r\n\r\nModular and signed types to convert between big and little endian, such as 50 (0x00000032) to 838860800 (0x32000000). Currently supported are 16/24/[32/64/128]-bit sized signed/modular/fp numeric types for big/little endian respectively, as well as system-endian dependent base types for 8/16/24/[32/64/128]-bit signed/modular/fp numeric types (for both categories: numbers in square brackets indicate the supported sizes of floating-points (fp.)))\r\n\r\nAll types are compatible with `Interfaces` operators, such as `Shift_Left`, `Shift_Right`, `Rotate_Left`, `Rotate_Right`, as well as (where applicable) `xor`, `and`, `or`.\r\n\r\n**NOTE:** This library depends on the GNAT compiler, as it depends on the `Provide_Shift_Operators` pragma. If you need support for another compiler, please let me know, and I'll try to support it.\r\n\r\n## Example Use\r\n\r\n```ada\r\nwith Byteflippers;\r\n\r\nwith Ada.Text_IO;\r\nwith Ada.Streams.Stream_IO;\r\nuse  Ada.Streams.Stream_IO;\r\n\r\nprocedure Scratch is\r\n    package Endians_u32 renames Byteflippers.Endians_Unsigned_32;\r\n\r\n    F : File_Type;\r\n    S : Stream_Access;\r\nbegin\r\n   Create (F, Name =\u003e \"test.bin\");\r\n   S := Stream (F);\r\n   Byteflippers.Signed_32'Write (S, 1234);\r\n   Endians_u32.Little_Endian'Write (S, 5678);\r\n   Endians_u32.Little_Endian'Write (S, 9101);\r\n   Endians_u32.Big_Endian'Write (S, 1213);\r\n   Endians_u32.Big_Endian'Write (S, 1415);\r\n\r\n   Close (F);   \r\n   Open (F, In_File, \"test.bin\");\r\n   S := Stream (F);\r\n\r\n   Ada.Text_IO.Put_Line (\"# System Endian Test\");\r\n   Ada.Text_IO.Put_Line (Byteflippers.Signed_32'Input (S)'Image);\r\n   Ada.Text_IO.Put_Line (\"# Little Endian Test (System / Little)\");\r\n   Ada.Text_IO.Put_Line (Byteflippers.Signed_32'Input (S)'Image);\r\n   Ada.Text_IO.Put_Line (Endians_u32.Little_Endian'Input (S)'Image);\r\n   Ada.Text_IO.Put_Line (\"# Big Endian Test (System / Big)\");\r\n   Ada.Text_IO.Put_Line (Byteflippers.Signed_32'Input (S)'Image);\r\n   Ada.Text_IO.Put_Line (Endians_u32.Big_Endian'Input (S)'Image);\r\nend Scratch;\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBread-Experts-Group%2Fbyteflippers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBread-Experts-Group%2Fbyteflippers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBread-Experts-Group%2Fbyteflippers/lists"}