mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
std/xz: refactor anticipating io_forget_history
This commit is contained in:
1 parent
e8af2d0635
commit
6482ba3923
2 files changed
+99
-81
No files matched your search
@@ -176,13 +176,14 @@ pri func decoder.do_transform_io?(dst: base.io_writer, src: base.io_reader, work
|
||||
while true {
|
||||
dmark = args.dst.mark()
|
||||
smark = args.src.mark()
|
||||
status =? this.lzma.transform_io?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
compressed_size ~mod+= args.src.count_since(mark: smark)
|
||||
uncompressed_size ~mod+= args.dst.count_since(mark: dmark)
|
||||
|
||||
if this.num_non_final_filters <> 0 {
|
||||
if this.num_non_final_filters == 0 {
|
||||
status =? this.lzma.transform_io?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
} else {
|
||||
status =? this.lzma.transform_io?(dst: args.dst, src: args.src, workbuf: args.workbuf)
|
||||
this.apply_non_final_filters!(dst_slice: args.dst.since(mark: dmark))
|
||||
}
|
||||
compressed_size ~mod+= args.src.count_since(mark: smark)
|
||||
uncompressed_size ~mod+= args.dst.count_since(mark: dmark)
|
||||
|
||||
if this.ignore_checksum {
|
||||
// No-op.
|
||||
|
||||
Reference in new issue
Block a user