mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Add an end of data concept
This commit is contained in:
1 parent
bde5a6d39e
commit
d3770b9972
9 files changed
+57
-14
No files matched your search
@@ -69,12 +69,16 @@ pub func decoder.decode_frame?(dst writer1, src reader1)() {
|
||||
//
|
||||
// TODO: reset this.lzw if it's not the first ID.
|
||||
this.decode_id?(dst:in.dst, src:in.src)
|
||||
} else if c == 0x3B { // The spec calls 0x3B the "Trailer".
|
||||
return
|
||||
} else if c == 0x3B { // The spec calls 0x3B the "Trailer".
|
||||
break
|
||||
} else {
|
||||
return error "bad GIF block"
|
||||
}
|
||||
}
|
||||
while true {
|
||||
yield suspension "end of data"
|
||||
}
|
||||
}
|
||||
|
||||
// decode_header reads either "GIF87a" or "GIF89a".
|
||||
|
||||
Reference in new issue
Block a user