-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Here is the repro
use fastpfor::rust::{FastPFOR, Integer, BLOCK_SIZE_128, DEFAULT_PAGE_SIZE};
use std::io::Cursor;
let input = vec![42u32];
let mut codec = FastPFOR::new(DEFAULT_PAGE_SIZE, BLOCK_SIZE_128);
let mut compressed = vec![0u32; 1024];
let mut output_cur = Cursor::new(0);
codec.compress(&input, input.len() as u32, &mut Cursor::new(0), &mut compressed, &mut output_cur).unwrap();
assert!(output_cur.position() != 0); // Fails! We have compressed something to nothing :(
let mut decompressed = vec![0u32; 1024];
codec.uncompress(&compressed, output_cur.position(), &mut Cursor::new(0), &mut decompressed, &mut Cursor::new(0)).unwrap();
assert_eq!(decompressed, input); // FAILS Input [42] -> Output []for more of these testcases (I could not get to a point where I know what is), please see
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels