Docs.rs
pi_download-0.4.0
pi_download 0.4.0
Permalink
Docs.rs crate page
MIT
OR
Apache-2.0
Links
Repository
crates.io
Source
Owners
wzjsun
github:gaiaworld:dev
Dependencies
pi_async_httpc ^0.6
normal
bytes ^1.1
normal
flume ^0.11
normal
futures ^0.3
normal
log ^0.4
normal
pi-async-rt ^0.2
normal
pi_async_file ^0.7
normal
pi_enum_default_macro ^0.1
normal
pi_hash ^0.1
normal
pi_rt_file ^0.5
normal
pi_share ^0.5
normal
pi_time ^0.5
normal
serde ^1.0
normal
serde_json ^1.0
normal
Versions
52.5%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Crate pi_download
pi_
download
0.4.0
All Items
Crate Items
Modules
Crate
pi_
download
Copy item path
Source
Modules
§
download
TODO 用基于 blake3 的 merkle tree来记录文件hash,https://rmw.link/zh/log/2022-06-02-blake3_merkle.html,这样在分段下载和断点续连中,可尽量减少文件读取IO和内存占用 TODO 用AsyncBytes来作为文件下载后的结果,这样可以尽量减少读取
tempfile
下载过程中的临时文件 临时文件保存下载数据及分段信息,下载成功后用rename改成file 分段信息文件的内容格式为u64的数组 下载到数据时,会存到临时文件内,并刷新segments
utils