Crates.io | bred |
lib.rs | bred |
version | 0.3.2 |
source | src |
created_at | 2022-10-08 01:03:25.450377 |
updated_at | 2022-11-19 06:58:17.79425 |
description | A simple binary file reader with coloring |
homepage | https://github.com/manorajesh/bred |
repository | https://github.com/manorajesh/bred |
max_upload_size | |
id | 683220 |
size | 18,123 |
A simple binary file reader that dumps the output to stdout
cargo install bred
Usage: bred [OPTIONS] [FILE]
Arguments:
[FILE] The file to read or stdin if not provided
Options:
-l, --length <CHARACTERS> Number of characters to print [default for hex: 8] [default: 64]
-c, --chunk <BYTES> Chunk size (faster but more memory usage) [default: 4096]
-x, --hex Print in hex
-G, --color Print in color
-s, --space Explicitly display space as placeholder: (_)
-b, --binary Print in binary
-h, --help Print help information
-V, --version Print version information
To use, input a file (or stdin
is used), and add any desired options.
_____
The --length
option changes how many characters to print (not including any formatting like offsets and borders).
The --chunk
option changes how large the buffer array should be; the bigger it is, the faster but uses more memory.
The --hex
option simply prints the input in hexadecimal.
The --color
option uses colors to differentiate between letters (\0
are gray, others indicate how large the character code is, and orange is non-ascii characters). Note, make sure you use a terminal emulator that supports ANSI 256-color mode.
The --space
option replaces all the spaces (0x20
) with a green-colored _
. This also affects the hex output.
The --binary
option prints the input in binary