mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 21:48:42 +00:00
Update doc of mod async_extracter
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
b152358175
commit
9de8a4841f
1 changed files with 1 additions and 3 deletions
|
@ -1,14 +1,12 @@
|
||||||
//! # Advantages
|
//! # Advantages
|
||||||
//!
|
//!
|
||||||
//! Using this mod has the following advantages over downloading
|
//! Using this mod has the following advantages over downloading
|
||||||
//! and extracting in on the async thread:
|
//! to file then extracting:
|
||||||
//!
|
//!
|
||||||
//! - The code is pipelined instead of storing the downloaded file in memory
|
//! - The code is pipelined instead of storing the downloaded file in memory
|
||||||
//! and extract it, except for `PkgFmt::Zip`, since `ZipArchiver::new`
|
//! and extract it, except for `PkgFmt::Zip`, since `ZipArchiver::new`
|
||||||
//! requires `std::io::Seek`, so it fallbacks to writing the a file then
|
//! requires `std::io::Seek`, so it fallbacks to writing the a file then
|
||||||
//! unzip it.
|
//! unzip it.
|
||||||
//! - The async part (downloading) and the extracting part runs in parallel
|
|
||||||
//! using `tokio::spawn_nonblocking`.
|
|
||||||
//! - Compressing/writing which takes a lot of CPU time will not block
|
//! - Compressing/writing which takes a lot of CPU time will not block
|
||||||
//! the runtime anymore.
|
//! the runtime anymore.
|
||||||
//! - For all `tar` based formats, it can extract only specified files and
|
//! - For all `tar` based formats, it can extract only specified files and
|
||||||
|
|
Loading…
Add table
Reference in a new issue