Skip to content

Commit

Permalink
noop complete, now decompresses
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrolo committed Oct 2, 2023
1 parent 4d570f3 commit 3e1a455
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions brro-compressor/src/compressor/noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ impl Noop {
}

/// Returns an array of data
pub fn to_data(&self) -> Vec<f64> {
Vec::new()
pub fn to_data(&self, _frame_size: usize) -> Vec<i64> {
self.data.clone()
}

}
Expand Down Expand Up @@ -81,4 +81,10 @@ mod tests {

assert_eq!(c.clone(), c2);
}

#[test]
fn test_decompression() {
let vector1 = vec![1.0, 2.0, 3.0, 4.0, 1.0];
assert_eq!(Noop::decompress(&noop(&vector1)).to_data(0), [1,2,3,4,1]);
}
}

0 comments on commit 3e1a455

Please sign in to comment.