mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Rename while:label to while.label
This commit is contained in:
1 parent
5d29c7df61
commit
7872a8893b
8 files changed
+27
-26
No files matched your search
@@ -71,7 +71,7 @@ pri func decoder.decode_huffman_fast!(dst base.io_writer, src base.io_reader) ba
|
||||
// for each. There are also up to 13 extra bits, or 2 bytes. Thus, each
|
||||
// code requires up to 2 + 2 + 2 == 6 bytes, and there are two codes (one
|
||||
// from H-L and one from H-D). Therefore, we check for at least 12 bytes.
|
||||
while:loop(args.dst.available() >= 258) and (args.src.available() >= 12) {
|
||||
while.loop(args.dst.available() >= 258) and (args.src.available() >= 12) {
|
||||
// Ensure that we have at least 15 bits of input.
|
||||
if n_bits < 15 {
|
||||
assert n_bits >= 0 // TODO: this shouldn't be necessary.
|
||||
@@ -100,14 +100,14 @@ pri func decoder.decode_huffman_fast!(dst base.io_writer, src base.io_reader) ba
|
||||
if (table_entry >> 31) <> 0 {
|
||||
// Literal.
|
||||
args.dst.write_fast_u8!(a:((table_entry >> 8) & 0xFF) as base.u8)
|
||||
continue:loop
|
||||
continue.loop
|
||||
} else if (table_entry >> 30) <> 0 {
|
||||
// No-op; code continues past the if-else chain.
|
||||
assert args.src.available() >= 8
|
||||
} else if (table_entry >> 29) <> 0 {
|
||||
// End of block.
|
||||
this.end_of_block = true
|
||||
break:loop
|
||||
break.loop
|
||||
} else if (table_entry >> 28) <> 0 {
|
||||
// Redirect.
|
||||
|
||||
@@ -138,13 +138,13 @@ pri func decoder.decode_huffman_fast!(dst base.io_writer, src base.io_reader) ba
|
||||
if (table_entry >> 31) <> 0 {
|
||||
// Literal.
|
||||
args.dst.write_fast_u8!(a:((table_entry >> 8) & 0xFF) as base.u8)
|
||||
continue:loop
|
||||
continue.loop
|
||||
} else if (table_entry >> 30) <> 0 {
|
||||
// No-op; code continues past the if-else chain.
|
||||
} else if (table_entry >> 29) <> 0 {
|
||||
// End of block.
|
||||
this.end_of_block = true
|
||||
break:loop
|
||||
break.loop
|
||||
} else if (table_entry >> 28) <> 0 {
|
||||
return "#internal error: inconsistent Huffman decoder state"
|
||||
} else if (table_entry >> 27) <> 0 {
|
||||
@@ -342,7 +342,7 @@ pri func decoder.decode_huffman_fast!(dst base.io_writer, src base.io_reader) ba
|
||||
|
||||
if length == 0 {
|
||||
// No need to copy from args.dst.
|
||||
continue:loop
|
||||
continue.loop
|
||||
}
|
||||
|
||||
if ((dist_minus_1 + 1) as base.u64) > args.dst.history_available() {
|
||||
|
||||
Reference in new issue
Block a user