mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Add while label to std/deflate decode_huffman_slow
This commit is contained in:
1 parent
bb8623b472
commit
ede0590ead
2 files changed
+5
-5
No files matched your search
@@ -201,7 +201,7 @@ pri func decoder.decode_huffman_slow?(dst: base.io_writer, src: base.io_reader)
|
||||
n_bits -= table_entry_n_bits
|
||||
}
|
||||
|
||||
while true {
|
||||
while.inner true {
|
||||
// Copy from this.history.
|
||||
if ((dist_minus_1 + 1) as base.u64) > args.dst.history_length() {
|
||||
// Set (hlen, hdist) to be the length-distance pair to copy
|
||||
@@ -255,11 +255,11 @@ pri func decoder.decode_huffman_slow?(dst: base.io_writer, src: base.io_reader)
|
||||
up_to: length, distance: (dist_minus_1 + 1))
|
||||
if length <= n_copied {
|
||||
length = 0
|
||||
break
|
||||
break.inner
|
||||
}
|
||||
length -= n_copied
|
||||
yield? base."$short write"
|
||||
} endwhile
|
||||
} endwhile.inner
|
||||
} endwhile.loop
|
||||
|
||||
// TODO: "assert n_bits < 8"? What about (bits >> n_bits)?
|
||||
|
||||
Reference in new issue
Block a user