Skip to content

PierreLouisLetoquart/bvtool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary visualization

Basic implementation of a binary file visualization algorithm. The idea is to generate a visual representation of a binary file, in order to have a quick overview of its content.

Link to the Christopher Domas's video

How it works

Here is the explanation of the main.rs file.

We get the raw byte data from a file :

let slice = load_file(file_path);

Then calculate a map (of 256x256 pixels) using slice parcour with a window size of 2 bytes :

let mut map = Map256::zeros();

generate_visualization(&slice, &mut map);

Finally, we generate an RGB image from the map and save it :

let img: RgbImage = map_to_image(&map);

img.save(&args.output).unwrap();

Output example (using rust exec as input) :

# run locally from the root of the project
cargo run -- -p ./target/debug/bvtool

rust exec visualization

References

Dataset

WIP

Actually I'm working on creating a large and diverse dataset of binary files representations. It aims to be used for training a neural network to recognize the type of file from its visual representation or other applications.

About

File visualization using raw binary data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages