| Crates.io | extract-strings |
| lib.rs | extract-strings |
| version | 0.4.0 |
| created_at | 2024-12-31 18:06:58.223586+00 |
| updated_at | 2025-01-04 14:22:10.879877+00 |
| description | Extract ascii strings from files |
| homepage | |
| repository | https://github.com/orf/archive-to-parquet |
| max_upload_size | |
| id | 1500239 |
| size | 9,292 |
A small utility to extract ascii strings from binary content.
use std::io::{BufReader, Write};
use extract_strings::AsciiStrings;
fn main() {
let path = std::env::args().nth(1).expect("no path provided");
let file = std::fs::File::open(path).expect("failed to open file");
let reader = BufReader::new(file);
let mut total = 0;
for string in reader.iter_ascii_strings(10) {
println!(out, "{}", string).unwrap();
total += 1;
}
println!(out, "Total strings: {total}").unwrap();
}