{"id":22511682,"url":"https://github.com/zeroxthreef/b2h","last_synced_at":"2025-10-29T13:49:24.952Z","repository":{"id":179796184,"uuid":"369054555","full_name":"zeroxthreef/b2h","owner":"zeroxthreef","description":"Yet another file to C header util","archived":false,"fork":false,"pushed_at":"2021-05-20T02:58:22.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T02:41:19.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeroxthreef.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":"2021-05-20T02:17:57.000Z","updated_at":"2021-05-20T02:58:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2e32a4f-7031-467e-b494-fe8049a1351d","html_url":"https://github.com/zeroxthreef/b2h","commit_stats":null,"previous_names":["zeroxthreef/b2h"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroxthreef%2Fb2h","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroxthreef%2Fb2h/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroxthreef%2Fb2h/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroxthreef%2Fb2h/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroxthreef","download_url":"https://codeload.github.com/zeroxthreef/b2h/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949592,"owners_count":20698921,"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":"2024-12-07T02:13:41.595Z","updated_at":"2025-10-29T13:49:19.909Z","avatar_url":"https://github.com/zeroxthreef.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# b2h\nb2h is a public domain minimal binary to header util that you can still embed into another program or use by itself. Just a single function and, when compiling standalone, it is its own utility. Written in an hour because I was tired of making ``xxd`` a dependency in my build scripts.\n\nb2h automatically appends a null terminator regardless of input. This will affect sizeof on the array var so the actual length is the ``\u003cfile-in-identifier\u003e_len`` var.\n\nb2h supports files over 4gb, but it has to run on a 64-bit machine.\n## Standalone Usage\n``c2d \u003cfile-in\u003e \u003cfile-out.h\u003e``\u003cbr\u003e\nWhose output file produced contains an unsigned long (unsigned long long if over ULONG_MAX) identifierized-name_len length and an unsigned char array called identifierized-name (``path/to/file.txt`` -\u003e ``path_to_file_txt_len`` \u0026 ``path_to_file_txt``).\n\n## Embedding\n```CPP\n#define B2H_IMPLEMENTATION\n#include \"b2h.c\"\n...\nheader_data = b2h(\"file_name.txt\", file_data, file_data_len);\n```\n\n## License\nPublic Domain\u003cbr\u003e\nUnlicense (international public domain)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroxthreef%2Fb2h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroxthreef%2Fb2h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroxthreef%2Fb2h/lists"}