GitHub - CallMeAlphabet/fasthex: fasthex — a very fast hex dumper
Navigation Menu
Toggle navigation
[](https://github.com/)
Appearance settings
* Platform
* AI CODE CREATION
- GitHub Copilot Write better code with AI
- GitHub Copilot app Direct agents from issue to merge
- MCP Registry New Integrate external tools
* DEVELOPER WORKFLOWS
- Actions Automate any workflow
- Codespaces Instant dev environments
- Code Review Manage code changes
* APPLICATION SECURITY
- GitHub Advanced Security Find and fix vulnerabilities
- Code security Secure your code as you build
- Secret protection Stop leaks before they start
* EXPLORE
- Blog
* Solutions
* BY COMPANY SIZE
- Startups
* BY USE CASE
- DevOps
- CI/CD
* BY INDUSTRY
* Resources
* EXPLORE BY TOPIC
- AI
- DevOps
- Security
* EXPLORE BY TYPE
* SUPPORT & SERVICES
- Partners
* Open Source
* COMMUNITY
- GitHub Sponsors Fund open source developers
* PROGRAMS
* REPOSITORIES
- Topics
- Trending
* Enterprise
* ENTERPRISE SOLUTIONS
- Enterprise platform AI-powered developer platform
* AVAILABLE ADD-ONS
- GitHub Advanced Security Enterprise-grade security features
- Copilot for Business Enterprise-grade AI features
- Premium Support Enterprise-grade 24/7 support
- Pricing
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search
Clear
Provide feedback
We read every piece of feedback, and take your input very seriously.
- [x] Include my email address so I can be contacted
Cancel Submit feedback
Saved searches
Use saved searches to filter your results more quickly
Name
Query
To see all available qualifiers, see our documentation.
Cancel Create saved search
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
CallMeAlphabet/**fasthex**Public
- NotificationsYou must be signed in to change notification settings
- Fork 0
- Star 3
- Code
- Issues 0
- Actions
- Projects
- Insights
Additional navigation options
- Code
- Issues
- Actions
- Projects
- Insights
[](https://github.com/CallMeAlphabet/fasthex)
CallMeAlphabet/fasthex
main
[](https://github.com/CallMeAlphabet/fasthex/branches)[](https://github.com/CallMeAlphabet/fasthex/tags)
Go to file
Code
Open more actions menu
Folders and files
| Name | Name | Last commit message | Last commit date | | --- | --- | --- | --- | | ## Latest commit ## History 45 Commits [](https://github.com/CallMeAlphabet/fasthex/commits/main/)45 Commits | | [src](https://github.com/CallMeAlphabet/fasthex/tree/main/src "src") | [src](https://github.com/CallMeAlphabet/fasthex/tree/main/src "src") | | | | [Cargo.toml](https://github.com/CallMeAlphabet/fasthex/blob/main/Cargo.toml "Cargo.toml") | [Cargo.toml](https://github.com/CallMeAlphabet/fasthex/blob/main/Cargo.toml "Cargo.toml") | | | | [LICENSE](https://github.com/CallMeAlphabet/fasthex/blob/main/LICENSE "LICENSE") | [LICENSE](https://github.com/CallMeAlphabet/fasthex/blob/main/LICENSE "LICENSE") | | | | [README.md](https://github.com/CallMeAlphabet/fasthex/blob/main/README.md "README.md") | [README.md](https://github.com/CallMeAlphabet/fasthex/blob/main/README.md "README.md") | | | | View all files |
Repository files navigation
- README
More items
fasthex
[](https://github.com/CallMeAlphabet/fasthex#fasthex)
fasthex — a very fast hex dumper (written in Rust), with all features that other hex dumpers have too.
Table of Contents
[](https://github.com/CallMeAlphabet/fasthex#table-of-contents)
- Usage
- Features
Quick Start
[](https://github.com/CallMeAlphabet/fasthex#quick-start)
undefinedshell
Install
cargo install --git https://github.com/CallMeAlphabet/fasthex undefined
> **Note**: Make sure `~/.cargo/bin` is in your `PATH`. It's added automatically by rustup, but if `fasthex` isn't found, add this to your shell config file: > > > > undefinedshell > # If you use Bash: > export PATH="$HOME/.cargo/bin:$PATH" > > # If you use Fish: > fish_add_path $HOME/.cargo/bin > > # If you use Zsh: > export PATH="$PATH:$HOME/.cargo/bin" > undefined
undefinedshell
Use it!
fasthex /path/to/file undefined
Benchmarks
[](https://github.com/CallMeAlphabet/fasthex#benchmarks)
Benchmark 1: 1.5 GiB file (output to /dev/null)
[](https://github.com/CallMeAlphabet/fasthex#benchmark-1-15-gib-file-output-to-devnull)
| Tool | Time | Speed vs fasthex | | --- | --- | --- | | **fasthex** | **0.78s** | **1x (baseline)** | | xxd | 43.62s | 55.5x slower | | hexyl¹ | 53.14s | 67.6x slower | | hexyl | 104.93s | 133.5x slower | | hexdump | 116.03s | 147.5x slower |
**¹ _--color=never was used to avoid colors._**
Benchmark 2: 69 GiB file (output to /dev/null)
[](https://github.com/CallMeAlphabet/fasthex#benchmark-2-69-gib-file-output-to-devnull)
| Tool | Time | | --- | --- | | fasthex | ~1m | | hexyl | ~1h 30m |
Uninstall
[](https://github.com/CallMeAlphabet/fasthex#uninstall)
undefinedshell cargo uninstall fasthex undefined
Usage
[](https://github.com/CallMeAlphabet/fasthex#usage)
Basic usage
[](https://github.com/CallMeAlphabet/fasthex#basic-usage)
undefinedshell
Display a file
fasthex /path/to/file
Pipe it (faster with zero-copy output)
fasthex /path/to/file > output.txt
Skip first 1 KiB and read only 512 bytes
fasthex -s 1KiB -n 512 /path/to/file
Display with colors
fasthex --color=always /path/to/file
Binary display
fasthex -b /path/to/file undefined
Common use cases
[](https://github.com/CallMeAlphabet/fasthex#common-use-cases)
undefinedshell
Test on RAM disk (avoids SSD/HDD bottleneck)
sudo mkdir -p /mnt/ramdisk sudo mount -t tmpfs -o size=2G tmpfs /mnt/ramdisk cp /path/to/file /mnt/ramdisk time fasthex /mnt/ramdisk/file > /dev/null
Measure time with `time`
time fasthex /path/to/file
Interactive viewing
fasthex /path/to/file | less undefined
Features
[](https://github.com/CallMeAlphabet/fasthex#features)
Supported Output Formats
[](https://github.com/CallMeAlphabet/fasthex#supported-output-formats)
- Octal (`-o`)
- Decimal (`-d`)
- Binary (`-b`)
- Colored output (`--color=always`)
- ... and more!
Display Options
[](https://github.com/CallMeAlphabet/fasthex#display-options)
- ASCII representation (default, disable with `-A`)
- Line squeezing for identical lines (`-w`)
- Arbitrary skip/length with size suffixes (`KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB`)
Example Output
[](https://github.com/CallMeAlphabet/fasthex#example-output)
``` ❯ fasthex3 /bin/ls | head 00000000: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............| 00000010: 03 00 3e 00 01 00 00 00 f0 54 00 00 00 00 00 00 |..>......T......| 00000020: 40 00 00 00 00 00 00 00 a8 73 02 00 00 00 00 00 |@........s......| 00000030: 00 00 00 00 40 00 38 00 0e 00 40 00 1c 00 1b 00 |....@.8...@.....| 00000040: 06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 |........@.......| 00000050: 40 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 |@.......@.......| 00000060: 10 03 00 00 00 00 00 00 10 03 00 00 00 00 00 00 |................| 00000070: 08 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 |................| 00000080: 74 03 00 00 00 00 00 00 74 03 00 00 00 00 00 00 |t.......t.......| 00000090: 74 03 00 00 00 00 00 00 1c 00 00 00 00 00 00 00 |t...............| ```
How It Works:
[](https://github.com/CallMeAlphabet/fasthex#how-it-works)
1. mmap path: output formatted in parallel with rayon in 64 MiB chunks. 2. AVX2 path: processes 32 bytes (2 rows) per SIMD call; falls back to SSE4.1/SSSE3 (16 bytes / 1 row) or scalar. 3. Double-buffered I/O: a dedicated writer thread drains completed chunks while rayon formats the next one. 4. MADV_SEQUENTIAL on open + MADV_WILLNEED two chunks ahead to hide mmap page-fault latency.
5. Zero-copy output via an internal pipe pair: formatted buffer → vmsplice (userspace pages → kernel pipe, zero-copy) → splice (kernel pipe → stdout fd, zero-copy) This path works regardless of what stdout is (/dev/null, file, pipe, socket) because we own the intermediate pipe. Falls back to write_all if splice rejects the stdout fd (e.g. a tty). 6. Streaming (stdin) path uses a 4 MiB write buffer.
Full Help
[](https://github.com/CallMeAlphabet/fasthex#full-help)
``` fasthex 0.3.0 - a very fast hex dumper
Usage: fasthex [options] [file]... fasthex -r [options] [file] [-j <offset>] fasthex [options] - read from stdin explicitly
Multiple files are concatenated and treated as one stream. If no file is given, reads from stdin.
OUTPUT FORMAT Rule: lowercase = one-byte mode, UPPERCASE = two-byte mode.
(default) canonical hex + ASCII display -x, --hex one-byte hexadecimal display -X, --hex-wide two-byte hexadecimal display -o, --octal one-byte octal display -O, --octal-wide two-byte octal display -d, --decimal one-byte decimal display -D, --decimal-wide two-byte decimal display -c, --chars one-byte character display -b, --binary binary display (8 bits per byte) -p, --plain plain hex string, no offset or ASCII -i, --include C include file style output -r, --reverse convert hex dump back to binary
LAYOUT -W, --width <N> bytes per row (default: 16) -g, --group <N> bytes per group: 1, 2, 4, 8 -E, --endian <MODE> big | little (default: big) -B, --border <STYLE> none | ascii | unicode (default: none) -A, --no-ascii hide the ASCII panel -P, --no-position hide the offset/position column
OFFSET & NAVIGATION -s, --skip <N> skip first N bytes (negative = from end) -n, --length <N> read only N bytes -j, --jump <N> bias added to every displayed offset -u, --uppercase uppercase hex digits (A-F) --offset-dec show offsets in decimal
COLOR -L, --color <WHEN> auto | always | never (default: auto) -S, --scheme <NAME> default | type | gradient -T, --table <MODE> ascii | default | braille | cp437 | ebcdic
FILTERING & FLOW -w, --squeeze replace identical rows with '*' -m, --max-lines <N> stop after N output lines -q, --quiet suppress warnings
CUSTOM FORMAT -F, --format <FMT> hexdump -e style format string -f, --format-file <FILE> read format strings from file
MISC -h, --help show this help -v, --version show version
SIZE SUFFIXES: KiB/K/MiB/M/GiB/G/TiB/T/PiB/P/EiB/E kB/MB/GB/TB/PB/EB 0x… ```
Testing Conditions
[](https://github.com/CallMeAlphabet/fasthex#testing-conditions)
- Hardware: Intel i5-7500T, 16GB DDR4 RAM, Samsung 990 Pro NVMe SSD
- OS Settings: `iommu.passthrough=0`, `iommu.strict=1` (you may get better results on the same hardware)
- Output: All tests redirected to `/dev/null`
- Flags: No additional unmentioned flags were used
- I use Arch GNU/Linux btw
About
fasthex — a very fast hex dumper
Resources
License
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages 0
Uh oh!
There was an error while loading. Please reload this page.
Contributors
* * *
Uh oh!
There was an error while loading. Please reload this page.
Languages
Footer
[](https://github.com/) © 2026 GitHub,Inc.
Footer navigation
- Terms
- Privacy
- Security
- Status
- Docs
- Contact
- Manage cookies
- Do not share my personal information
You can’t perform that action at this time.