Skip to content

4zv4l/xxd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

xxd

basic xxd clone in Zig

usage

usage: xxd [option] [file]

Options:
    -r     reverse operation (hex dump -> bytes)

dump file

$ ./xxd test
00000000: 4865 6c6c 6f2c 2057 6f72 6c64 2021 2046  Hello, World ! F
00000010: 6f6f 2042 6172 0a                        oo Bar.

load from dump (hex to bytes)

$ ./xxd -r test_hex
Hello, World ! Foo Bar

it can also read from stdin if piped

$ ./xxd test | ./xxd -r | ./xxd
00000000: 4865 6c6c 6f2c 2057 6f72 6c64 2021 2046  Hello, World ! F
00000010: 6f6f 2042 6172 0a                        oo Bar.

how to compile

with the zig compiler

$ zig build-exe -D ReleaseSmall xxd.zig

About

basic xxd clone in Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages