mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Add endwhile syntax
This commit is contained in:
1 parent
d1a4abe321
commit
b1e3a15c08
9 files changed
+53
-29
No files matched your search
@@ -257,7 +257,7 @@ pri func decoder.decode_blocks?(dst: base.io_writer, src: base.io_reader) {
|
||||
continue.outer
|
||||
}
|
||||
}
|
||||
}
|
||||
} endwhile.outer
|
||||
}
|
||||
|
||||
// decode_uncompressed decodes an uncompresed block as per the RFC section
|
||||
|
||||
@@ -362,7 +362,7 @@ pri func decoder.decode_huffman_fast!(dst: base.io_writer, src: base.io_reader)
|
||||
args.dst.copy_n32_from_history_fast!(n: length, distance: (dist_minus_1 + 1))
|
||||
break
|
||||
}
|
||||
}
|
||||
} endwhile.loop
|
||||
|
||||
// Ensure n_bits < 8 by rewindng args.src, if we loaded too many of its
|
||||
// bytes into the bits variable.
|
||||
|
||||
@@ -272,7 +272,7 @@ pri func decoder.decode_huffman_slow?(dst: base.io_writer, src: base.io_reader)
|
||||
length -= n_copied
|
||||
yield? base."$short write"
|
||||
}
|
||||
}
|
||||
} endwhile.loop
|
||||
|
||||
// TODO: "assert n_bits < 8"? What about (bits >> n_bits)?
|
||||
|
||||
|
||||
Reference in new issue
Block a user