{"id":22326213,"url":"https://github.com/lpg2709/zigdump","last_synced_at":"2025-07-11T12:04:57.382Z","repository":{"id":265871688,"uuid":"801276304","full_name":"lpg2709/zigdump","owner":"lpg2709","description":"Tool to view files in hexadecimal format, like xxd, but in zig","archived":false,"fork":false,"pushed_at":"2024-05-15T23:28:58.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T11:05:44.700Z","etag":null,"topics":["hexdump","xxd","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpg2709.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-15T23:25:12.000Z","updated_at":"2024-05-15T23:29:01.000Z","dependencies_parsed_at":"2024-12-01T10:20:17.676Z","dependency_job_id":null,"html_url":"https://github.com/lpg2709/zigdump","commit_stats":null,"previous_names":["lpg2709/zigdump"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpg2709%2Fzigdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpg2709%2Fzigdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpg2709%2Fzigdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpg2709%2Fzigdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpg2709","download_url":"https://codeload.github.com/lpg2709/zigdump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598318,"owners_count":20641884,"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":["hexdump","xxd","zig"],"created_at":"2024-12-04T02:16:18.961Z","updated_at":"2025-03-26T06:12:10.401Z","avatar_url":"https://github.com/lpg2709.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zigdump\n\nTool to view files in hexadecimal format, like xxd, but in [zig](https://ziglang.org/).\n\n\u003e Not include all funcitions from xxd, this is only a program to studies.\n\n\n## Build\n\nSetup zig in your machine. Developed on zig 0.12.0\n\n```sh\nzig build\n```\n\nExecutable inside `./zig-out/bin`.\n\n## References\n\n- [Zig Doc](https://ziglang.org/documentation/0.12.0/)\n- [Zig Standar Library](https://ziglang.org/documentation/0.12.0/std/)\n- [xxd man](https://linux.die.net/man/1/xxd)\n- [xxd source code](https://github.com/vim/vim/blob/master/src/xxd/xxd.c)\n\n## Benchmark\n\n- **Compiled with: `zig build -Doptimize=Debug`**\n\n| Command                       |       Mean [s] | Min [s] | Max [s] |    Relative |\n|:------------------------------|---------------:|--------:|--------:|------------:|\n| `xxd ./zig`                   | 44.780 ± 1.379 |  42.368 |  47.603 |        1.00 |\n| `./zig-out/bin/zigdump ./zig` | 47.753 ± 0.386 |  47.420 |  48.423 | 1.07 ± 0.03 |\n\n- **Compiled with: `zig build -Doptimize=ReleaseSafe`**\n\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\n|:------------------------------|---------------:|-------:|-------:|------------:|\n| `xxd ./zig`                   | 44.106 ± 0.868 | 42.578 | 45.315 | 5.94 ± 0.12 |\n| `./zig-out/bin/zigdump ./zig` | 7.421 ± 0.033  | 7.371  | 7.466  | 1.00        |\n\n- **Compiled with: `zig build -Doptimize=ReleaseFast`**\n\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\n|:------------------------------|---------------:|-------:|-------:|------------:|\n| `xxd ./zig`                   | 47.417 ± 2.821 | 44.298 | 50.783 | 7.12 ± 0.42 |\n| `./zig-out/bin/zigdump ./zig` | 6.663 ± 0.033  | 6.619  | 6.704  | 1.00        |\n\n- **Compiled with: `zig build -Doptimize=ReleaseSmall`**\n\n| Command                       |       Mean [s] | Min [s] | Max [s] |    Relative |\n|:------------------------------|---------------:|--------:|--------:|------------:|\n| `xxd ./zig`                   | 49.071 ± 0.404 |  48.554 |  49.711 | 5.34 ± 0.08 |\n| `./zig-out/bin/zigdump ./zig` |  9.187 ± 0.120 |   9.088 |   9.510 |        1.00 |\n\nOnly for fun. There is a lot of difference in implemented features\n\nUsed [hyperfine](https://github.com/sharkdp/hyperfine) for benchmark.\n\nAll tests made with `zig` 0.12.0 binary, with the follow script\n\n```sh\n#!/bin/bash\noptions=(\"Debug\" \"ReleaseSafe\" \"ReleaseFast\" \"ReleaseSmall\")\nbin=\"./zig\"\nif [ ! -d \"logs\" ]; then\n\tmkdir logs\nfi\nfor opt in \"${options[@]}\"; do\n\techo \"\u003e\u003e Compiling for options ${opt} ...\"\n\t zig build -Doptimize=${opt}\n\t if [ \"$?\" -eq 0 ]; then\n\t\techo \"\u003e\u003e Making benchmark for ${opt}\"\n\t\t ./hyperfine --export-markdown \"logs/${opt}.md\" --warmup 3 \"xxd $bin\" \"./zig-out/bin/zigdump $bin\"\n\t else\n\t\techo \"\u003e\u003e Compilation fail!\"\n\t fi\ndone\necho \"\u003e\u003e Done\"\n```\n\n## Features\n\n- [x] View data in hexadecimal and printable characters\n- [ ] Switch to bits. `-b | -bits`\n- [ ] Select column size by `-c | -cols`\n- [ ] Separate the output of evrey byte by a whitespace `-g | -groupsize`\n- [ ] Stop after writing some octets `-l | -len`\n- [ ] Start read from byte `-s | -seek`\n- [ ] Hexa output in uppercase letters `-u`\n\n\u003e Maybe in the future, but not now?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpg2709%2Fzigdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpg2709%2Fzigdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpg2709%2Fzigdump/lists"}