Add lzw_decoder.set_literal_width.

This commit is contained in:
Nigel Tao committed 2017-06-11 14:02:05 +10:00
1 parent c27bec10d3
commit 019e83f190
8 files changed
+170 -31

No files matched your search

+4
View File
@@ -13,6 +13,10 @@ pub struct lzw_decoder?(
prefixes[4096] u16[..4095],
)
pub func lzw_decoder.set_literal_width(lw u32[2..8] = 8)() {
this.literal_width = in.lw
}
pub func lzw_decoder.decode?(dst ptr buf1, src ptr buf1, src_final bool)() {
// These variables don't change over the lifetime of this func.
var clear_code u32[4..256] = (1 as u32) << this.literal_width