lvkolb/zzd
Project to give an introduction and start learning Zig for a university course. A hexdump utility built with Zig that helps you inspect binary content in a human-readable format.
Project to give an introduction and start learning Zig for a university course. A hexdump utility built with Zig that helps you inspect binary content in a human-readable format.
Before installing zzd
, ensure you have Zig installed on your system.
git clone https://github.com/lvkolb/zzd.git
cd zzd
Choose one of the following installation methods:
# Build and install to /usr/local/bin (requires admin privileges)
zig build install-to-bin
# Just build the project
zig build
zzd <filename> [options]
zig-out\bin\zzd <filename> [options]
zig-out/bin/zzd <filename> [options]
--line-length=<n> Set the number of bytes per line (default: 16, max: 64)
--group=<n> Group bytes in sets of n (default: 1)
--no-ascii Don't display ASCII representation
--no-offset Don't display offset column
--color=<n> Set color display mode
(default: hex) Display numbers in hexadecimal
--decimal Display numbers in decimal
--octal Display numbers in octal
--binary Display numbers in binary
--limit=<n> Limit the number of bytes displayed
--skip=<n> Skip first n bytes of input
--highlight=<hex> Highlight specific byte sequences (can be used multiple times)
# Display a file in default hexadecimal format
zzd sequence.bin
zig-out\bin\zzd zzd sequence.bin
zig-out/bin/zzd zzd sequence.bin
# Display with custom line length and grouping
zzd sequence.bin --line-length=32 --group=4
zig-out\bin\zzd zzd sequence.bin --line-length=32 --group=4
zig-out/bin/zzd zzd sequence.bin --line-length=32 --group=4
# Show only decimal values without ASCII
zzd sequence.bin --decimal --no-ascii
zig-out\bin\zzd zzd sequence.bin --decimal --no-ascii
zig-out/bin/zzd zzd sequence.bin --decimal --no-ascii
# Skip first 100 bytes and limit output to 500 bytes
zzd large_file.bin --skip=100 --limit=500
zig-out\bin\zzd zzd large_file.bin --skip=100 --limit=500
zig-out/bin/zzd zzd large_file.bin --skip=100 --limit=500
# Highlight specific byte patterns
zzd firmware.bin --highlight=FF00 --highlight=A5
zig-out\bin\zzd zzd firmware.bin --highlight=FF00 --highlight=A5
zig-out/bin/zzd zzd firmware.bin --highlight=FF00 --highlight=A5
# Custom formatting with binary output
zzd data.bin --binary --line-length=8 --group=4
zig-out\bin\zzd zzd data.bin --binary --line-length=8 --group=4
zig-out/bin/zzd zzd data.bin --binary --line-length=8 --group=4
This project is licensed under the MIT License - see the LICENSE file for details