YADM is a lightweight disk mapping tool designed for small-scale projects.
It allows you to serialize the structure of a file system directory into compact and optimized formats for fast storage and access.
- Generates lightweight and ultra-optimized mapping files.
- Provides serializers for Rust to handle
.msgpack.tar.gzfiles.
Running a command like ./yadm.exe serialize "C://" will perform the following steps:
- Traverse the specified directory and collect all file and folder metadata.
- Convert the resulting data structure into a MessagePack object.
- Compress the MessagePack file using
tar.gz. - Output the final mapping as
map.msgpack.tar.gz.
In my personal configuration :
- SSD NVMe
- 471,45 Go on 500,00 Go used
- Output result :
1. Scanning folders at: C:// Scan Time: 195.4473487s Elements found: 2065488 2. Parsing to hashmap... 3. Encoding + writing MessagePack... --- Résultats --- Compression Time: 5.5725601s Average compression time per file: 2697 ns Compressed file size: 358444787 octets Compressed file size: 350043.74 Ko Compressed file size: 341.84 Mo Average compressed size per file: 173 octets
There are two main commands:
-
yadm serialize "path" --use-tar-gz=true
→ Maps a directory and outputs a compressed.msgpack.tar.gzfile. -
yadm serialize "path" --use-tar-gz=false
→ Outputs a raw.msgpackfile (uncompressed). -
yadm parse "map.msgpack.tar.gz"
→ Parses the mapping and loads it into memory as aVec<HashMap<String, String>>.
You can integrate YADM directly in your Rust project like this:
use yadm::{serialize, parse};
use std::collections::HashMap;
fn main() {
// Serialize a directory
serialize("C://", true);
// Parse the resulting file
let map: Vec<HashMap<String, String>> = parse("map.msgpack.tar.gz");
// You can now use `map` in your application
}
⚠️ Make sure to handle Result and error types appropriately in real applications.