{"id":20565546,"url":"https://github.com/alja7dali/swift-bits","last_synced_at":"2025-12-05T14:03:03.254Z","repository":{"id":131322615,"uuid":"340388629","full_name":"Alja7dali/swift-bits","owner":"Alja7dali","description":"A bite sized library for dealing with bytes.","archived":false,"fork":false,"pushed_at":"2021-02-19T14:13:15.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T19:51:25.518Z","etag":null,"topics":["binary","bit","bits","byte","bytes","comprehension","data","manipulation","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Alja7dali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-02-19T14:11:19.000Z","updated_at":"2021-07-29T05:32:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad441ef9-4ade-47b2-8855-62c3fe4ace88","html_url":"https://github.com/Alja7dali/swift-bits","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alja7dali%2Fswift-bits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alja7dali%2Fswift-bits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alja7dali%2Fswift-bits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alja7dali%2Fswift-bits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alja7dali","download_url":"https://codeload.github.com/Alja7dali/swift-bits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242179230,"owners_count":20084940,"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","bit","bits","byte","bytes","comprehension","data","manipulation","swift"],"created_at":"2024-11-16T04:37:58.177Z","updated_at":"2025-12-05T14:02:58.221Z","avatar_url":"https://github.com/Alja7dali.png","language":"Swift","readme":"###### This is a modified forked repo of [Vapor-Bits](https://github.com/vapor-community/bits)\n###### Why it been modified, because it serve a specific purpose `working with bytes only`. No need for the extra stuff that the original repo has, they can be in separate repo.\n\n#### Example:\n\n```swift\nimport Bits\n\nlet meaningOfLife: Double = -42.0\n\nlet bytes = meaningOfLife.makeBytes()\n\nprint(bytes) // [0, 0, 0, 0, 0, 0, 69, 192]\n\ndo {\n  let float = try Float(bytes)\n} catch {\n  print(error) // BytesConversionError.invalidConversion(to: Swift.Float)\n}\n\nprint(Bytes(-42.0 as Float)) // [0, 0, 40, 194]\n\nif let double = try? Double(bytes) {\n  print(double) // -42.0\n}\n```\n\n#### Importing Bits:\n\nTo include `Bits` in your project, you need to add the following to the `dependencies` attribute defined in your `Package.swift` file.\n```swift\ndependencies: [\n  .package(url: \"https://github.com/alja7dali/swift-bits.git\", from: \"1.0.0\")\n]\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falja7dali%2Fswift-bits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falja7dali%2Fswift-bits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falja7dali%2Fswift-bits/lists"}