mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +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
@@ -28176,13 +28176,13 @@ wuffs_deflate__decoder__decode_huffman_slow(
|
|||||||
&iop_a_dst, io0_a_dst, io2_a_dst, v_length, (v_dist_minus_1 + 1));
|
&iop_a_dst, io0_a_dst, io2_a_dst, v_length, (v_dist_minus_1 + 1));
|
||||||
if (v_length <= v_n_copied) {
|
if (v_length <= v_n_copied) {
|
||||||
v_length = 0;
|
v_length = 0;
|
||||||
goto label__5__break;
|
goto label__inner__break;
|
||||||
}
|
}
|
||||||
v_length -= v_n_copied;
|
v_length -= v_n_copied;
|
||||||
status = wuffs_base__make_status(wuffs_base__suspension__short_write);
|
status = wuffs_base__make_status(wuffs_base__suspension__short_write);
|
||||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(10);
|
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(10);
|
||||||
}
|
}
|
||||||
label__5__break:;
|
label__inner__break:;
|
||||||
}
|
}
|
||||||
label__loop__break:;
|
label__loop__break:;
|
||||||
self->private_impl.f_bits = v_bits;
|
self->private_impl.f_bits = v_bits;
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ pri func decoder.decode_huffman_slow?(dst: base.io_writer, src: base.io_reader)
|
|||||||
n_bits -= table_entry_n_bits
|
n_bits -= table_entry_n_bits
|
||||||
}
|
}
|
||||||
|
|
||||||
while true {
|
while.inner true {
|
||||||
// Copy from this.history.
|
// Copy from this.history.
|
||||||
if ((dist_minus_1 + 1) as base.u64) > args.dst.history_length() {
|
if ((dist_minus_1 + 1) as base.u64) > args.dst.history_length() {
|
||||||
// Set (hlen, hdist) to be the length-distance pair to copy
|
// 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))
|
up_to: length, distance: (dist_minus_1 + 1))
|
||||||
if length <= n_copied {
|
if length <= n_copied {
|
||||||
length = 0
|
length = 0
|
||||||
break
|
break.inner
|
||||||
}
|
}
|
||||||
length -= n_copied
|
length -= n_copied
|
||||||
yield? base."$short write"
|
yield? base."$short write"
|
||||||
} endwhile
|
} endwhile.inner
|
||||||
} endwhile.loop
|
} endwhile.loop
|
||||||
|
|
||||||
// TODO: "assert n_bits < 8"? What about (bits >> n_bits)?
|
// TODO: "assert n_bits < 8"? What about (bits >> n_bits)?
|
||||||
|
|||||||
Reference in new issue
Block a user