Use an experimental feature to avoid copying 64k in memory

This commit is contained in:
Clément Renault
2024-07-03 17:51:53 +02:00
parent fd8c90b858
commit deee22b5da
4 changed files with 9 additions and 152 deletions

View File

@@ -38,7 +38,7 @@ heed = { version = "0.20.3", default-features = false, features = [
indexmap = { version = "2.2.6", features = ["serde"] }
json-depth-checker = { path = "../json-depth-checker" }
levenshtein_automata = { version = "0.2.1", features = ["fst_automaton"] }
zstd = { version = "0.11.2", features = ["zdict_builder"] }
zstd = { version = "0.13.1", features = ["zdict_builder", "experimental"] }
memmap2 = "0.9.4"
obkv = "0.2.2"
once_cell = "1.19.0"

View File

@@ -374,7 +374,7 @@ impl Index {
&self,
rtxn: &'t RoTxn,
) -> heed::Result<Option<DecoderDictionary<'t>>> {
self.document_compression_raw_dictionary(rtxn).map(|opt| opt.map(DecoderDictionary::copy))
self.document_compression_raw_dictionary(rtxn).map(|opt| opt.map(DecoderDictionary::new))
}
pub fn document_compression_dictionary(