1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use archive::cache_archive::CacheArchive;
use group::GroupError;
use std::collections::HashMap;
use store::Store;

mod archive;
pub mod cache;
pub mod checksumtable;
mod djb2;
mod ffi;
mod group;
mod js5_compression;
mod js5_index;
pub mod js5_masterindex;
pub mod store;
mod xtea;

const _MAX_GROUP_SIZE: usize = (1 << 24) - 1;

pub struct Cache {
    /// Store
    store: Box<dyn Store>,

    /// Archives
    archives: HashMap<u8, CacheArchive>,

    /// Unpacked cache size
    _unpacked_cache_size: usize,
}