Open
Description
openedon Feb 8, 2022
As of Wuffs v0.3, there is a base.io_transformer
interface:
set_quirk_enabled!(quirk: u32, enabled: bool)
transform_io?(dst: io_writer, src: io_reader, workbuf: slice u8)
workbuf_len() range_ii_u64
and every compression decoder is a base.io_transformer
, but there isn't an additional base.compression_decoder
interface. Instead, we have some ad hoc additional methods:
deflate.decoder.add_history!(hist: slice u8)
lzw.decoder.flush!() slice u8
lzw.decoder.set_literal_width!(lw: u32[..= 8])
zlib.decoder.add_dictionary!(dict: slice u8)
zlib.decoder.dictionary_id() u32
- There's also the
gzip.decoder
struct, which doesn't export anything beyond thebase.io_transformer
methods.
It would be nice if there was a common API, at least for the dictionary / history concepts.
Metadata
Assignees
Labels
No labels
Activity