Skip to content

Commit

Permalink
Fix comment. Decrease limit
Browse files Browse the repository at this point in the history
  • Loading branch information
audy committed Jan 6, 2024
1 parent 532a039 commit 03fccfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/src/serialization/mash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ pub fn write_mash_file(file: &mut dyn Write, sketches: &[Sketch]) -> FinchResult

pub fn read_mash_file(file: &mut dyn BufRead) -> FinchResult<Vec<Sketch>> {
let options = *message::ReaderOptions::new().traversal_limit_in_words(
// 10 Gigabytes
Some(10 * 1024 * 1024 * 1024),
// measured in words
// 1 word = 8 bytes
Some(2 * 1024 * 1024 * 1024),
);
let reader = capnp_serialize::read_message(file, options)?;
let mash_data: min_hash::Reader = reader.get_root::<min_hash::Reader>()?;
Expand Down
5 changes: 3 additions & 2 deletions lib/src/serialization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ pub fn write_finch_file(file: &mut dyn Write, sketches: &[Sketch]) -> FinchResul

pub fn read_finch_file(file: &mut dyn BufRead) -> FinchResult<Vec<Sketch>> {
let options = *message::ReaderOptions::new().traversal_limit_in_words(
// 10 Gigabytes
Some(10 * 1024 * 1024 * 1024),
// measured in words
// 1 word = 8 bytes
Some(2 * 1024 * 1024 * 1024),
);
let reader = capnp_serialize::read_message(file, options)?;
let cap_data: multisketch::Reader = reader.get_root::<multisketch::Reader>()?;
Expand Down

0 comments on commit 03fccfc

Please sign in to comment.