#filesystem #key-value-store #file #automatic #compression #time

archivist

Store files in a time or index based directory hierarchy, automatically deleting the oldest files if the size limit is reached

7 unstable releases (3 breaking)

0.3.0 Oct 25, 2024
0.2.0 Oct 10, 2024
0.1.1 May 16, 2024
0.0.3 May 16, 2024
0.0.0 Aug 30, 2019

#1376 in Database interfaces

Download history 9/week @ 2024-09-18 32/week @ 2024-09-25 183/week @ 2024-10-09 12/week @ 2024-10-16 107/week @ 2024-10-23 16/week @ 2024-10-30 10/week @ 2024-11-06 4/week @ 2024-11-13 7/week @ 2024-11-20 7/week @ 2024-11-27 89/week @ 2024-12-04 63/week @ 2024-12-11 8/week @ 2024-12-18 13/week @ 2024-12-25

180 downloads per month

MIT license

1MB
298 lines

Archivist

Crates.io Version Crates.io License docs.rs

Store files in a time or index based directory hierarchy, automatically deleting the oldest files if the size limit is reached.

It's using an efficient kv-store database for persistency and performance reasons.

    // Store at max 1GB of files
    let mut a = Archivist::new("/tmp/archive", DateTimeTree::default(), 1000).await?;
   
    // Our humble file that we want to keep, but may lose interest after some time 
    let mut f = fs::File::open("/tmp/my_words.txt").unwrap();

    // crate a store object for file compression
    let ss = GzStore::new(Cursor::new(f.clone()));

    // add the file to the archive
    a.add("words.txt.gz", &ss).await?;

Copyright 2022-2024, Falco Hirschenberger falco.hirschenberger@gmail.com

Dependencies

~10–18MB
~222K SLoC