1 unstable release
new 0.1.1 | Feb 18, 2025 |
---|---|
0.1.0 |
|
#467 in Compression
120 downloads per month
15KB
201 lines
Used to convert any stream into a put request through writer and upload it to the server, so as to achieve file-free landing.
fn main() -> std::io::Result<()> {
let writer = http_writer::HttpWriter::new("http://192.168.100.100/archive.tar.xz").unwrap();
//
// cargo add xz2 tar
//
let encoder = xz2::write::XzEncoder::new(writer, 6);
let mut tar_builder = tar::Builder::new(encoder);
tar.append_dir_all("backup/logs", "/var/log")?;
Ok(())
}
Dependencies
~7–18MB
~233K SLoC