All Projects → wolandr → pretty-hex

wolandr / pretty-hex

Licence: MIT license
A Rust library providing pretty hex dump.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pretty-hex

titef
🌠 A tiny, lightning-fast, zero-dependecies JavaScript test framework 🌠
Stars: ✭ 19 (-44.12%)
Mutual labels:  zero-dependency
http-node-api
O objetivo dessa aplicação era criar uma API sem nenhuma dependência externa, apenas utilizando as bibliotecas nativas do NodeJS. Tudo foi feito utilizando 100% Javascript.
Stars: ✭ 44 (+29.41%)
Mutual labels:  zero-dependency
fireworks-js
🎆 A simple fireworks library! Ready to use components available for React, Vue 3, Svelte, Angular, Preact, Solid, and Web Components.
Stars: ✭ 550 (+1517.65%)
Mutual labels:  zero-dependency
async
Synchronization and asynchronous computation package for Go
Stars: ✭ 104 (+205.88%)
Mutual labels:  zero-dependency
RussianNounsJS
Склонение существительных по падежам. Обычно требуются только форма в именительном падеже, одушевлённость и род.
Stars: ✭ 29 (-14.71%)
Mutual labels:  zero-dependency
hxd
Speedy colored hexdump
Stars: ✭ 33 (-2.94%)
Mutual labels:  hexdump
tonic
A Low Profile Component Framework – Stable, minimal, easy to audit, zero-dependencies and build-tool-free.
Stars: ✭ 747 (+2097.06%)
Mutual labels:  zero-dependency
Charts
Simple, responsive, modern SVG Charts with zero dependencies
Stars: ✭ 14,112 (+41405.88%)
Mutual labels:  zero-dependency
Oatpp
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.
Stars: ✭ 4,750 (+13870.59%)
Mutual labels:  zero-dependency
Jslint
JSLint, The JavaScript Code Quality and Coverage Tool
Stars: ✭ 3,479 (+10132.35%)
Mutual labels:  zero-dependency
Wouter
🥢 A minimalist-friendly ~1.5KB routing for React and Preact. Nothing else but HOOKS.
Stars: ✭ 3,654 (+10647.06%)
Mutual labels:  zero-dependency
trail
Routing library for the Scala platform
Stars: ✭ 76 (+123.53%)
Mutual labels:  zero-dependency
react-apple-signin-auth
 Apple signin for React using the official Apple JS SDK
Stars: ✭ 58 (+70.59%)
Mutual labels:  zero-dependency
hydrate-text
A small, dependency-free and strongly typed template engine.
Stars: ✭ 45 (+32.35%)
Mutual labels:  zero-dependency
hexdump.rb
Fully Featured and Fast hexdumping for Ruby.
Stars: ✭ 71 (+108.82%)
Mutual labels:  hexdump

pretty-hex

crates.io docs.rs

A Rust library providing pretty hex dump.

A simple_hex() way renders one-line hex dump, a pretty_hex() way renders columned multi-line hex dump with addressing and ASCII representation. A config_hex() way renders hex dump in specified format.

Example of simple_hex()

use pretty_hex::*;

let v = vec![222, 173, 190, 239, 202, 254, 32, 24];
assert_eq!(simple_hex(&v), format!("{}", v.hex_dump()));

println!("{}", v.hex_dump());

Output:

de ad be ef  ca fe 20 18

Example of pretty_hex()

use pretty_hex::*;

let v: &[u8] = &random::<[u8;30]>();
assert_eq!(pretty_hex(&v), format!("{:?}", v.hex_dump()));

println!("{:?}", v.hex_dump());

Output:

Length: 30 (0x1e) bytes
0000:   6b 4e 1a c3  af 03 d2 1e  7e 73 ba c8  bd 84 0f 83   kN......~s......
0010:   89 d5 cf 90  23 67 4b 48  db b1 bc 35  bf ee         ....#gKH...5..

Example of config_hex()

use pretty_hex::*;

let cfg = HexConfig {title: false, width: 8, group: 0, ..HexConfig::default() };

let v = &include_bytes!("data");
assert_eq!(config_hex(&v, cfg), format!("{:?}", v.hex_conf(cfg)));

println!("{:?}", v.hex_conf(cfg));

Output:

0000:   6b 4e 1a c3 af 03 d2 1e   kN......
0008:   7e 73 ba c8 bd 84 0f 83   ~s......
0010:   89 d5 cf 90 23 67 4b 48   ....#gKH
0018:   db b1 bc 35 bf ee         ...5..

Inspired by haskell's pretty-hex.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].