mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 00:47:28 +01:00
Make std/gif's LZW decoder private
This commit is contained in:
1 parent
44f5b2d384
commit
2e12a41414
4 files changed
+40
-109
No files matched your search
@@ -17,7 +17,7 @@
|
||||
pub error "LZW code is out of range"
|
||||
pub error "LZW prefix chain is cyclical"
|
||||
|
||||
pub struct lzw_decoder?(
|
||||
pri struct lzw_decoder?(
|
||||
literal_width u32[2..8] = 8,
|
||||
stack[4096] u8,
|
||||
suffixes[4096] u8,
|
||||
@@ -25,11 +25,11 @@ pub struct lzw_decoder?(
|
||||
)
|
||||
|
||||
// TODO: add a ! as this function is impure.
|
||||
pub func lzw_decoder.set_literal_width(lw u32[2..8] = 8)() {
|
||||
pri func lzw_decoder.set_literal_width(lw u32[2..8] = 8)() {
|
||||
this.literal_width = in.lw
|
||||
}
|
||||
|
||||
pub func lzw_decoder.decode?(dst writer1, src reader1)() {
|
||||
pri func lzw_decoder.decode?(dst writer1, src reader1)() {
|
||||
// These variables don't change over the lifetime of this func.
|
||||
var clear_code u32[4..256] = (1 as u32) << this.literal_width
|
||||
var end_code u32[5..257] = clear_code + 1
|
||||
|
||||
Reference in new issue
Block a user