| Crates.io | utils-box-archives |
| lib.rs | utils-box-archives |
| version | 1.0.1 |
| created_at | 2025-11-03 07:01:48.919909+00 |
| updated_at | 2025-11-03 07:01:48.919909+00 |
| description | A toolbox of various small RUST utilities that makes handling compressed files easier |
| homepage | |
| repository | https://github.com/klispap/utils-box |
| max_upload_size | |
| id | 1914058 |
| size | 37,910 |
A toolbox library that holds a useful collection of small unitilies written in Rust that make our life easier when writting Rust applications.
Extract files from Tar, Gz and Zip Files
Mininal Example:
let archive: PathBuf = std::env::current_exe()
.unwrap()
.parent()
.unwrap()
.join("test_archive.tar.gz");
let file: PathBuf = "treasure.hex".into();
let destination: PathBuf = std::env::current_exe()
.unwrap()
.parent()
.unwrap();
archives::extract_file(archive, ArchiveType::Gz, file, destination).unwrap();
Make sure you have the following system-level dependencies installed:
sudo apt install pkg-config build-essential fontconfig libfontconfig1-dev
Verify that pkg-config can detect libstdc++ properly:
pkg-config --libs libstdc++
If libstdc++ is not detected, add the symbolic link:
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so /usr/lib/libstdc++.so