1 unstable release

0.1.0 Oct 5, 2023

#1754 in Database interfaces

Download history 20/week @ 2024-06-02 40/week @ 2024-06-09 15/week @ 2024-06-16 20/week @ 2024-06-23 5/week @ 2024-06-30 4/week @ 2024-07-07 17/week @ 2024-07-14 37/week @ 2024-07-21 31/week @ 2024-07-28 15/week @ 2024-08-04 8/week @ 2024-08-11 2/week @ 2024-08-18 64/week @ 2024-08-25 56/week @ 2024-09-01 47/week @ 2024-09-08 53/week @ 2024-09-15

220 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–18MB
~251K SLoC