Skip to content

Commit

Permalink
make window size big enough to fit whole 128kb block into it
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Oct 18, 2024
1 parent 12496f9 commit 32a25af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/encoding/frame_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ mod tests {
let mut decoded = Vec::with_capacity(mock_data.len());
decoder.decode_all_to_vec(&output, &mut decoded).unwrap();
assert_eq!(mock_data, decoded);

let mut decoded = Vec::new();
zstd::stream::copy_decode(output.as_slice(), &mut decoded).unwrap();
assert_eq!(mock_data, decoded);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/encoding/frame_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl FrameHeader {
// `Window_Descriptor
// TODO: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor
if !self.single_segment {
let exponent = 6;
let exponent = 7;
output.push(exponent << 3);
}

Expand Down

0 comments on commit 32a25af

Please sign in to comment.