orottier / rust-warc Goto Github PK
View Code? Open in Web Editor NEWA high performance and easy to use Web Archive (WARC) file reader
A high performance and easy to use Web Archive (WARC) file reader
I don't know if this is maintained, but I came here because warc took 34 seconds just to iterate through an archive with no processing and I wanted to see if this crate was faster.
I tried to read the Commoncrawl archive file CC-MAIN-20221210042021-20221210072021-00866.warc.gz
(link, 1.1 GB compressed file) through a GzDecoder
with a BufReader
on top but I only get the first record:
pub fn analyse_warc(path: &str) -> Result<(), std::io::Error> {
let f = File::open(path)?;
let decoder = GzDecoder::new(f);
let reader = BufReader::new(decoder);
let warc = WarcReader::new(reader);
for item in warc {
println!("WARC: {:#?}", item.unwrap().header);
}
}
Prints:
WARC: {
CaseString {
inner: "content-length",
}: "500",
CaseString {
inner: "warc-date",
}: "2022-12-10T04:20:21Z",
CaseString {
inner: "warc-type",
}: "warcinfo",
CaseString {
inner: "content-type",
}: "application/warc-fields",
CaseString {
inner: "warc-filename",
}: "CC-MAIN-20221210042021-20221210072021-00866.warc.gz",
CaseString {
inner: "warc-record-id",
}: "<urn:uuid:e609d058-9d7c-45ee-9292-eba237b4de5c>",
}
My guess would be that this would apply to all of the commoncrawl records.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.