mirror of
https://github.com/exoticorn/upkr.git
synced 2026-11-13 15:47:19 +01:00
fix creating broken files if they end with a match
This commit is contained in:
1 parent
08c86af06f
commit
f7f891e154
1 file changed
+3
-1
@@ -40,7 +40,9 @@ impl Op {
|
||||
|
||||
pub fn encode_eof(coder: &mut dyn EntropyCoder, state: &mut CoderState) {
|
||||
encode_bit(coder, state, 0, true);
|
||||
encode_bit(coder, state, 256, true);
|
||||
if !state.prev_was_match {
|
||||
encode_bit(coder, state, 256, true);
|
||||
}
|
||||
encode_length(coder, state, 257, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user