1 unstable release

0.1.0 Oct 5, 2023

#1858 in Database interfaces

Download history 39/week @ 2024-07-22 34/week @ 2024-07-29 9/week @ 2024-08-05 7/week @ 2024-08-12 3/week @ 2024-08-19 66/week @ 2024-08-26 57/week @ 2024-09-02 49/week @ 2024-09-09 49/week @ 2024-09-16 88/week @ 2024-09-23 56/week @ 2024-09-30 22/week @ 2024-10-14 26/week @ 2024-10-21 28/week @ 2024-10-28 16/week @ 2024-11-04

92 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

~7–17MB
~240K SLoC