1 unstable release
0.1.0 | Oct 5, 2023 |
---|
#1754 in Database interfaces
220 downloads per month
Used in 3 crates
(via bonsaidb)
1MB
20K
SLoC
BonsaiDb File Storage
This crate provides support for storing large files in BonsaiDb. While BonsaiDb's document size limit is 4 gigabytes, the requirement that each document is loaded in memory fully can cause higher memory usage when storing larger files.
This crate provides a set of collections that store files in smaller chunks and provide access to the files contents using buffered and random access.
lib.rs
:
Large file storage support for BonsaiDb.
This crate provides support for storing large files in BonsaiDb. While BonsaiDb's document size limit is 4 gigabytes, the requirement that each document is loaded in memory fully can cause higher memory usage when storing larger files.
FileConfig
The FileConfig
trait allows customizing the CollectionName
s and
block size. If you want to use smaller or larger blocks, you can. If you
want to store more than one set of files in the same database, you can use
two FileConfig
implementors with different CollectionName
s.
For most users, the provided implementation BonsaiFiles
will work for
them.
Basic Example
Async Support
This crate adds implementations of tokio::io::AsyncRead
and
tokio::io::AsyncWrite
when the async
feature flag is enabled.
Dependencies
~8–18MB
~251K SLoC