{"id":28509134,"url":"https://github.com/atomicobject/hex_string","last_synced_at":"2025-10-25T18:39:36.650Z","repository":{"id":56876333,"uuid":"2006409","full_name":"atomicobject/hex_string","owner":"atomicobject","description":"String extensions to convert binary data to / from human readable hex tuples.","archived":false,"fork":false,"pushed_at":"2017-08-08T23:14:10.000Z","size":11,"stargazers_count":35,"open_issues_count":0,"forks_count":7,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-06-08T22:08:07.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.atomicobject.com/pages/Software+Commons","language":"Ruby","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/atomicobject.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":"2011-07-06T12:52:30.000Z","updated_at":"2024-06-05T14:49:48.000Z","dependencies_parsed_at":"2022-08-20T11:30:59.724Z","dependency_job_id":null,"html_url":"https://github.com/atomicobject/hex_string","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atomicobject/hex_string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fhex_string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fhex_string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fhex_string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fhex_string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicobject","download_url":"https://codeload.github.com/atomicobject/hex_string/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fhex_string/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263232722,"owners_count":23434727,"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":"2025-06-08T22:07:32.585Z","updated_at":"2025-10-25T18:39:36.550Z","avatar_url":"https://github.com/atomicobject.png","language":"Ruby","readme":"Description\n===========\nHexString provides two String extension methods: \n\n* `String#to_hex_string` explodes a string of binary data into human-readable hex tuples, and \n* `String#to_byte_string` converts a string of human-readable hex digits into the corresponding bytes.\n\nExamples\n--------\n\n    # Convert data to human-readable hex tuples:\n    \u003e\u003e \"hello\".to_hex_string\n    =\u003e \"68 65 6c 6c 6f\"\n\n    # Compact a hex string into its data equivalent:\n    \u003e\u003e \"77 6f 72 6c 64\".to_byte_string\n    =\u003e \"world\"\n\n    # (#to_byte_string is space and case-insensitive:)\n    \u003e\u003e \"776F726C64\".to_byte_string\n    =\u003e \"world\"\n\n    # Peek at the first 4 bytes of an executable on OS X:\n    \u003e\u003e File.read(\"/bin/ls\")[0..3].to_hex_string\n    =\u003e \"ca fe ba be\"\n\n    # Omit spaces in hex string output:\n    \u003e\u003e \"hello\".to_hex_string(false)\n    =\u003e \"68656c6c6f\"\n\nMotivation\n----------\nWhen working with binary message or file formats, we often want to have a peek\nat some segment of binary data and talk about individual byte values in\nhuman-relatable terms.\n\nThis sort of thing comes in handy during testing, debugging and data\nintrospection, especially when it's inconvenient or impractical to capture the\ndesired binary data to file in order to view it with a hex editor or other\nbinary file reader.\n\nWe were inspired to publish this humble Gem after we found ourselves copying it\nby hand from project to project over the course of several years.\n\nAuthors\n=======\n* Micah Alles (alles@atomicobject.com)\n* David Crosby (crosby@atomicobject.com)\n* © 2011 [Atomic Object](http://www.atomicobject.com/)\n* More Atomic Object [open source](http://www.atomicobject.com/pages/Software+Commons) projects\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Fhex_string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicobject%2Fhex_string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Fhex_string/lists"}