{"id":22769805,"url":"https://github.com/bfontaine/dz","last_synced_at":"2025-03-30T11:29:49.914Z","repository":{"id":11495792,"uuid":"13971509","full_name":"bfontaine/dz","owner":"bfontaine","description":"Dead simple hex2bin CLI tool","archived":false,"fork":false,"pushed_at":"2014-02-02T21:30:03.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:43:40.146Z","etag":null,"topics":["hexadecimal","ruby","tool"],"latest_commit_sha":null,"homepage":null,"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/bfontaine.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}},"created_at":"2013-10-29T23:08:02.000Z","updated_at":"2017-06-30T15:39:46.000Z","dependencies_parsed_at":"2022-09-22T23:30:27.478Z","dependency_job_id":null,"html_url":"https://github.com/bfontaine/dz","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/bfontaine%2Fdz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fdz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fdz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fdz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfontaine","download_url":"https://codeload.github.com/bfontaine/dz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246313223,"owners_count":20757446,"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":["hexadecimal","ruby","tool"],"created_at":"2024-12-11T15:15:53.854Z","updated_at":"2025-03-30T11:29:49.885Z","avatar_url":"https://github.com/bfontaine.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dz\n\n[![Build Status](https://travis-ci.org/bfontaine/dz.png?branch=master)](https://travis-ci.org/bfontaine/dz)\n[![Gem Version](https://badge.fury.io/rb/dz.png)](http://badge.fury.io/rb/dz)\n[![Coverage Status](https://coveralls.io/repos/bfontaine/dz/badge.png)](https://coveralls.io/r/bfontaine/dz)\n[![Dependency Status](https://gemnasium.com/bfontaine/dz.png)](https://gemnasium.com/bfontaine/dz)\n\n**dz** is a dead simple hexadecimal-to-binary tool. It’s handy to create\nbinaries by hand (yeah, some people do that).\n\n## Install\n\n```\ngem install dz\n```\n\n## Usage\n\n```\n$ dz input.dz output\n```\n\nGive it two filenames. It’ll read the first one and write binary data into the\nsecond one. That’s it!\n\nOkay, one more thing: if you give `-` for the input, it'll read on stdin, and if\nyou give more than two files, it'll assume that the last one is the output and\nall the others are parts of the input. So,\n\n```sh\ndz input{1,2,3}.dz output.bin\n```\n\nis equivalent to:\n\n```sh\ncat input{1,2,3}.dz | dz - output.bin\n```\n\n### Syntax\n\nI use `.dz` for input files but you can use what you want, they are plain text\nfiles.\n\nEach byte is written as an hexadecimal number. Two bytes must be separated by\none or more spaces and/or newlines. Comments start with a `#` and take the whole\nline. Non-hexadecimal chars (outside of comments) are ignored.\n\n#### Example\n\n```\n# file header\n34 | 00 | 0A 0A\n\n# first part\n01 | 00 | 00 00 02 | AA AF\n# second part\n01 | 0F | 00 00 06 | AA CC 89 3B 01 79\n```\n\nSave this in `example.dz`, then run:\n\n```\n$ dz example.dz example\n```\n\nyou can now check the binary using `hexdump`:\n\n```\n$ hexdump example\n0000000 34 00 0a 0a 01 00 00 00 02 aa af 01 0f 00 00 06\n0000010 aa cc 89 3b 01 79\n0000016\n```\n\n## Tests\n\n```\n$ git clone https://github.com/bfontaine/dz.git\n$ cd dz\n$ bundle install\n$ bundle exec rake test\n```\n\nIt’ll generate a `coverage/index.html`, which you can open in a Web browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fdz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfontaine%2Fdz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fdz/lists"}