1 unstable release

0.1.0 Oct 5, 2023

#1540 in Database interfaces

Download history 15/week @ 2024-02-19 36/week @ 2024-02-26 34/week @ 2024-03-04 39/week @ 2024-03-11 15/week @ 2024-03-18 64/week @ 2024-03-25 128/week @ 2024-04-01 40/week @ 2024-04-08 31/week @ 2024-04-15

264 downloads per month
Used in 3 crates (via bonsaidb)

MIT/Apache

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 CollectionNames 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 CollectionNames.

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–19MB
~252K SLoC