use std::fs::File;
use std::io;
use std::io::Write;
fn main() -> io::Result<()> {
let file = File::create("file.zip")?;
let mut zip = zip::ZipWriter::new(file);
zip.start_file("file.txt", zip::write::FileOptions::default())?;
zip.write_all(b"zipzipzipzipzipzipzipzipzipzipzipzipzipzipzipzip")?;
Ok(())
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询