mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Rename decode_io_writer methods to transform_io
This commit is contained in:
1 parent
ab0b2fd2aa
commit
5f8d2da74f
17 files changed
+168
-178
No files matched your search
@@ -186,7 +186,7 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||
max_incl: decoder_workbuf_len_max_incl_worst_case)
|
||||
}
|
||||
|
||||
pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
pub func decoder.transform_io?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
var mark : base.u64
|
||||
var status : base.status
|
||||
|
||||
|
||||
@@ -976,7 +976,7 @@ pri func decoder.decode_id_part2?(dst: ptr base.pixel_buffer, src: base.io_reade
|
||||
}
|
||||
io_bind (io: r, data: this.compressed[this.compressed_ri .. this.compressed_wi]) {
|
||||
mark = r.mark()
|
||||
lzw_status =? this.lzw.decode_io_writer?(
|
||||
lzw_status =? this.lzw.transform_io?(
|
||||
dst: this.util.empty_io_writer(), src: r, workbuf: this.util.empty_slice_u8())
|
||||
this.compressed_ri ~sat+= r.count_since(mark: mark)
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||
max_incl: decoder_workbuf_len_max_incl_worst_case)
|
||||
}
|
||||
|
||||
pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
pub func decoder.transform_io?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
var c : base.u8
|
||||
var flags : base.u8
|
||||
var xlen : base.u16
|
||||
@@ -113,7 +113,7 @@ pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, wor
|
||||
// Decode and checksum the DEFLATE-encoded payload.
|
||||
while true {
|
||||
mark = args.dst.mark()
|
||||
status =? this.flate.decode_io_writer?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
status =? this.flate.transform_io?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
if not this.ignore_checksum {
|
||||
checksum_got = this.checksum.update_u32!(x: args.dst.since(mark: mark))
|
||||
decoded_length_got ~mod+= ((args.dst.count_since(mark: mark) & 0xFFFFFFFF) as base.u32)
|
||||
|
||||
@@ -29,7 +29,7 @@ pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 0
|
||||
pub struct decoder?(
|
||||
// set_literal_width_arg is 1 plus the saved argument passed to
|
||||
// set_literal_width. This is assigned to the literal_width field at the
|
||||
// start of decode_io_writer. During that method, calling set_literal_width
|
||||
// start of transform_io. During that method, calling set_literal_width
|
||||
// will change set_literal_width_arg but not literal_width.
|
||||
set_literal_width_arg : base.u32[..= 9],
|
||||
|
||||
@@ -77,7 +77,7 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||
return this.util.make_range_ii_u64(min_incl: 0, max_incl: 0)
|
||||
}
|
||||
|
||||
pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
pub func decoder.transform_io?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
var i : base.u32[..= 8191]
|
||||
|
||||
// Initialize read_from state.
|
||||
|
||||
@@ -69,7 +69,7 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
|
||||
max_incl: decoder_workbuf_len_max_incl_worst_case)
|
||||
}
|
||||
|
||||
pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
pub func decoder.transform_io?(dst: base.io_writer, src: base.io_reader, workbuf: slice base.u8) {
|
||||
var x : base.u16
|
||||
var checksum_got : base.u32
|
||||
var status : base.status
|
||||
@@ -109,7 +109,7 @@ pub func decoder.decode_io_writer?(dst: base.io_writer, src: base.io_reader, wor
|
||||
// Decode and checksum the DEFLATE-encoded payload.
|
||||
while true {
|
||||
mark = args.dst.mark()
|
||||
status =? this.flate.decode_io_writer?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
status =? this.flate.transform_io?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
if not this.ignore_checksum {
|
||||
checksum_got = this.checksum.update_u32!(x: args.dst.since(mark: mark))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user