rem broken seg

brotli by default
This commit is contained in:
Paul Masurel
2021-01-09 09:30:12 +09:00
parent 5583e5d0ad
commit 98d17c9c77
3 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ debug-assertions = true
overflow-checks = true
[features]
default = ["mmap"]
default = ["mmap", "brotli"]
mmap = ["fs2", "tempfile", "memmap"]
brotli-compression = ["brotli"]
lz4-compression = ["lz4"]

View File

@@ -53,6 +53,7 @@ impl StoreReader {
pub fn documents(&self) -> Vec<Document> {
let mut documents = Vec::new();
for checkpoint in self.skip_index.checkpoints() {
println!("{:?}", checkpoint);
let block = self.read_block(&checkpoint).unwrap();
let mut cursor = &block[..];
while cursor.len() > 0 {
@@ -119,7 +120,6 @@ impl StoreReader {
let doc_length = VInt::deserialize(&mut cursor)?.val() as usize;
cursor = &cursor[doc_length..];
}
let doc_length = VInt::deserialize(&mut cursor)?.val() as usize;
cursor = &cursor[..doc_length];
Ok(Document::deserialize(&mut cursor)?)