blocked-vec

Crates.ioblocked-vec
lib.rsblocked-vec
version0.1.8
sourcesrc
created_at2022-10-03 11:01:52.60371
updated_at2022-10-04 05:41:40.772923
descriptionA vector of byte blocks behaving like files
homepagehttps://github.com/js2xxx/blocked-vec
repositoryhttps://github.com/js2xxx/blocked-vec
max_upload_size
id678919
size45,493
Js2xxx (js2xxx)

documentation

https://docs.rs/blocked-vec

README

blocked-vec

A blocked vector, used like a File but is implemented purely in memory, supporting all vectorized operations. The APIs are pretty similar, like general std::io traits implementation, set_len (called resize here), append, and XX_at operations (like FileExt on *nix platforms).

Implementation

This structure is implemented as a vector of blocks, as the name implies. A block consists of an array of continuous memory pages, whose layout is either through querying the system or from the given parameter (new_paged, with_len_paged). This implementation is used to avoid frequent calls of reallocation methods when manipulating with massive data.

Commit count: 19

cargo fmt