mhv is a minimalist hexadecimal viewer.

Overview

MHV

Crates.io Crates.io Downloads Rust Stable License GitHub Actions Workflow Status

How it works?

  • The color legend

    • ⬛ Null byte
    • 🟦 ASCII Printable Characters
    • 🟩 Space Characters
    • 🟩 Control Characters
    • πŸŸ₯ ASCII Extended Codes
  • Install

$ cargo install mhv

Usage

❯ mhv -h
A minimalist hex viewer

Usage: mhv [OPTIONS] <FILENAME>

Arguments:
  <FILENAME>  Target file

Options:
  -s, --skip <N>      Skip `N` bytes of the input. The `N` argument can also
                      include an unit (see `--length` for details). [default: 0]
  -l, --length <N>    Read `N` bytes from the input. None for full read. The `N`
                      argument can be a unit with a decimal prefix(kb, mb).
                      Examples: --length 3kb, -l3kb, --length 1mb...
                      N unis are kb(1000), K(1024), mb(1000 * 1000) M(1024 * 1024),
                      and a prefix 0x for hexadecimal, `0x0a`.
  -n, --no-squeezing  Displays all input data. Otherwise any number of output
                      lines which would be identical to the last one are replaced
                      with a line comprised of a single asterisk.
  -h, --help          Print help
  -V, --version       Print versio

Stream Workflow

Usage examples

  • Read 5 bytes from start

  • Read 32 bytes from start

  • Skip 16 bytes and read 40

  • Read using units kb(1000), K(1024), mb(1000 * 1000) or M(1024 * 1024)

  • Read from offset 0x50 plus 16 bytes

  • Read UTF16 file

You might also like...
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

πŸ‘Ύ Modern and minimalist pixel editor

β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ `rx` is a modern and minimalist pixel editor. Designed with g

Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

A minimalist Rust WebAssembly project template

MiniWASM - A minimalist Rust WebAssembly project template This is a minimal Rust-powered WebAssembly application template. It was designed to showcase

A minimalist and safe ECS library for rust!
A minimalist and safe ECS library for rust!

The full ECS (Entity-Component-System) library. Support an Open Source Developer! β™₯️ Composed of two smaller libraries: world_dispatcher: the System p

A minimalist tool for managing block-lists from the terminal.
A minimalist tool for managing block-lists from the terminal.

Block List A minimalist hosts-based tool for managing block lists and ad-blocking. This project uses the excellent and regularly updated Unified Hosts

Minimalist pedantic command line parser

Lexopt Lexopt is an argument parser for Rust. It tries to have the simplest possible design that's still correct. It's so simple that it's a bit tedio

Very minimalist tmux status bar that displays used memory and CPU usage.
Very minimalist tmux status bar that displays used memory and CPU usage.

woot-bar Ultra minimalist status bar that displays used memory and CPU usage woot-bar is made for tmux but it is compatible with anything that eats st

A minimalist socket-based client/server in Rust to illustrate a tutorial

The basics of unix sockets This repository serves as a reference for this tutorial blogpost How to run Install Rust and Cargo, and then do: cargo run

Super Fast & High Performance minimalist web framework for rust

Super Fast & High Performance minimalist web framework for rust

A minimalist property-based testing library based on the arbitrary crate.

A minimalist property-based testing library based on the arbitrary crate.

Archeum - a minimalist text editor

Archeum About The Project Archeum is a minimalist text editor that is really usefull if you've been in the vim psychosis for to long. Reject plugins,

Simple and minimalist forward auth service intended for use with reverse proxies (Traefik, Caddy, nginx, etc)
Simple and minimalist forward auth service intended for use with reverse proxies (Traefik, Caddy, nginx, etc)

nforwardauth nforwardauth is an extremely lightweight, blazing fast forward auth service that lets you use a single authentication middleware for all

Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

Minimalist multi-track audio recorder which may be controlled via OSC or MIDI.
Minimalist multi-track audio recorder which may be controlled via OSC or MIDI.

smrec Minimalist multi-track audio recorder which may be controlled via OSC or MIDI. I did this because I needed a simple multi-track audio recorder w

Small command-line JSON Log viewer
Small command-line JSON Log viewer

fblog A small tool to view json log files. Filter To filter log messages it is possible to use lua fblog -f 'level ~= "info"' # will print all message

Cross-platform live-reloading GFM compatible markdown viewer
Cross-platform live-reloading GFM compatible markdown viewer

A simple cross-platform markdown viewer Usage markdown-viewer use the system file dialog to choose a markdown file to view markdown-viewer my_file.md

Simple terminal alignment viewer
Simple terminal alignment viewer

Alen Simple terminal sequence alignment viewer. What is Alen? It's a command-like program to view DNA or protein alignments in FASTA formats. Alen is

Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD
Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD

Foxtrot is a fast viewer for STEP files, a standard interchange format for mechanical CAD. It is an experimental project built from the ground up, including new libraries for parsing and triangulation.

Comments
  • Enhance characters and rendering

    Enhance characters and rendering

    • Changed 0xff to print ff and bright red;

    • changed 0x00 to print 00 and bright black;

    • Complete with spaces missing bytes in redenring;

    • The tests was refactored;

    • For the last panel we print x for extended characters and ff, and . for 00;

    enhancement 
    opened by jgardona 0
  • Enhance characteres

    Enhance characteres

    Enhance characters to better visualization. Another different characters, print 0x00 as 00 and 0xff as FF, and use in left panel more diferse characters.

    enhancement 
    opened by jgardona 0
  • Ref: Use owo colors

    Ref: Use owo colors

    • Owo colors crate doesn't allocate. We got a boost in performance:

    hyperfine --warmup 1000 -N 'target/release/mhv -l1kb tests/data/data1kb' 'mhv -l1kb tests/data/data1kb' Benchmark 1: target/release/mhv -l1kb tests/data/data1kb Time (mean Β± Οƒ): 3.8 ms Β± 0.1 ms [User: 1.3 ms, System: 2.0 ms] Range (min … max): 3.6 ms … 4.4 ms 746 runs

    Benchmark 2: mhv -l1kb tests/data/data1kb Time (mean Β± Οƒ): 4.1 ms Β± 0.2 ms [User: 1.6 ms, System: 2.0 ms] Range (min … max): 3.9 ms … 4.9 ms 608 runs

    Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

    Summary target/release/mhv -l1kb tests/data/data1kb ran 1.08 Β± 0.06 times faster than mhv -l1kb tests/data/data1kb

    • Implement new units K and M.
    • function display_data was refactored to better fit unit tests.
    • bug fix - squeezing first line.
    refactioring 
    opened by jgardona 0
Owner
JΓΊlio CΓ©sar de Brito Gardona
Father, rustacean πŸ¦€, gopher 🐹 ,open sourcerer πŸͺ„ and digital artist πŸ‘¨πŸΌβ€πŸŽ¨ from Brazil.
JΓΊlio CΓ©sar de Brito Gardona
A minimalist tool for managing block-lists from the terminal.

Block List A minimalist hosts-based tool for managing block lists and ad-blocking. This project uses the excellent and regularly updated Unified Hosts

Oliver Brotchie 7 Aug 14, 2022
Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

jacek SQ6KBQ 8 Aug 30, 2023
Simple terminal alignment viewer

Alen Simple terminal sequence alignment viewer. What is Alen? It's a command-like program to view DNA or protein alignments in FASTA formats. Alen is

Jakob Nybo Nissen 51 Dec 19, 2022
TUI image viewer

Picterm TUI image viewer install $ cargo install picterm or $ git clone https://github.com/ksk001100/picterm $ cd picterm $ cargo install --path . usa

Keisuke Toyota 41 Dec 31, 2022
hexyl is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes

hexyl is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes (NULL bytes, printable ASCII characters, ASCII whitespace characters, other ASCII characters and non-ASCII).

David Peter 7.3k Dec 29, 2022
A SARIF viewer for the command-line.

sarif_cli A SARIF viewer for the command-line. Because numerous static analysis tools, such as #CodeQL and #semgrep, use the SARIF format. I decided t

Jordy Zomer 3 Jan 3, 2023
An AST viewer UI for languages with an AST.

AST Viewer UI This project was inspired by "Zoom Out": The missing feature of IDEs. I want to create a GUI with text fields, boxes, arrows, etc. and g

West 3 Dec 22, 2022
A simple cross-platform easy to use STL Viewer with GUI and CLI options

Stlvi STL viewer written in Rust. This project is still in development. It is available in both CLI and GUI mode. Supported OS Linux Windows Mac Scree

Mantresh Khurana 4 Mar 2, 2023
A ranger-like flake.lock viewer [maintainer=@figsoda]

nix-melt A ranger-like flake.lock viewer Usage nix run github:nix-community/nix-melt Usage: nix-melt [OPTIONS] [PATH] Arguments: [PATH] Path to th

Nix community projects 120 Jun 28, 2023
πŸ“Ί(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

??(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

Alex Hallam 1.8k Jan 2, 2023