mirror of
https://github.com/exoticorn/upkr.git
synced 2026-01-21 03:56:42 +01:00
fix creating broken files if they end with a match
This commit is contained in:
@@ -40,7 +40,9 @@ impl Op {
|
|||||||
|
|
||||||
pub fn encode_eof(coder: &mut dyn EntropyCoder, state: &mut CoderState) {
|
pub fn encode_eof(coder: &mut dyn EntropyCoder, state: &mut CoderState) {
|
||||||
encode_bit(coder, state, 0, true);
|
encode_bit(coder, state, 0, true);
|
||||||
|
if !state.prev_was_match {
|
||||||
encode_bit(coder, state, 256, true);
|
encode_bit(coder, state, 256, true);
|
||||||
|
}
|
||||||
encode_length(coder, state, 257, 1);
|
encode_length(coder, state, 257, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user