mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Call copy_history32 in a trival 1-iteration loop.
Follow-up commits will re-try copy_history32's across I/O boundaries.
This commit is contained in:
1 parent
d30d4c3dad
commit
a1271222a4
2 files changed
+46
-37
No files matched your search
@@ -341,9 +341,12 @@ pri func decoder.decode_huffman?(dst writer1, src reader1)() {
|
||||
// TODO: copy_history32 should also take some notion of how much of dst
|
||||
// is valid. When copying from a distance greater than that, we also
|
||||
// need to keep a sliding window of previous history.
|
||||
if (distance as u64) > in.dst.length() {
|
||||
while true {
|
||||
if (distance as u64) > in.dst.length() {
|
||||
}
|
||||
in.dst.copy_history32?(distance:distance, length:length)
|
||||
break
|
||||
}
|
||||
in.dst.copy_history32?(distance:distance, length:length)
|
||||
}
|
||||
|
||||
this.bits = bits
|
||||
|
||||
Reference in new issue
Block a user