A Rust project for generating and analyzing binary data.
This project demonstrates basic file I/O and binary data manipulation in Rust. It includes a binary data generator that creates a binary file with predefined data and a binary data checker (main.rs
) that reads the generated binary file and performs simple analysis.
binary_data_checker/
│
├── src/
│ ├── main.rs # Binary data checker
│ ├── lib/
│ │ ├── binary_data_lib.rs# Binary data library
│ │ └── mod.rs # Module declaration
│ └── ...
│
├── data/
│ └── binary/
│ └── example.bin # Generated binary file
│
├── Cargo.toml # Project manifest
└── ...
Run the main file's CLI file generator to create a binary file:
$ cargo run --bin main -- --generate
This will generate a binary file (example.bin
) in the data/binary/
directory.
Run the binary data checker to analyze the generated binary file:
$ cargo run --bin main
The checker will read the binary file and perform basic analysis, displaying the results.
log::{error, info, LevelFilter}
: Logging (error/info)std::fs::File
: File I/O operations (read/write)std::io::{self, Read, Write}
: I/O operations (read/write)std::{env, fmt, fs}
: Filesystem operations and formatting (buffered)std::{path::PathBuf, path::Path}
: Filesystem paths and operations (buffered)
This project is licensed under the MIT License - see the LICENSE file for details.