#filesystem #data-structures

archivist

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

11 releases

0.4.3 Aug 7, 2025
0.4.1 Jun 4, 2025
0.3.0 Oct 25, 2024
0.1.1 May 16, 2024
0.0.0 Aug 30, 2019

#781 in Database interfaces

Download history 73/week @ 2025-10-07 1/week @ 2025-10-14 25/week @ 2025-10-21 34/week @ 2025-10-28 89/week @ 2025-11-04 11/week @ 2025-12-02 106/week @ 2025-12-09 40/week @ 2026-01-13 31/week @ 2026-01-20

73 downloads per month

MIT license

1MB
326 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 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?;

Changelog

  • 7.8.2025: Use turbojpeg for Jpeg encoding. Requires Nasm assembler to be installed.

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

Dependencies

~32MB
~508K SLoC