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:
Nigel Tao committed 2017-10-06 14:53:45 +11:00
1 parent d30d4c3dad
commit a1271222a4
2 files changed
+46 -37

No files matched your search

+5 -2
View File
@@ -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