std/xz: use io_forget_history

This commit is contained in:
Nigel Tao committed 2024-02-09 15:06:11 +11:00
1 parent 9fb3859488
commit d2ecc20141
5 files changed
+152 -19

No files matched your search

+6 -1
View File
@@ -179,7 +179,12 @@ pri func decoder.do_transform_io?(dst: base.io_writer, src: base.io_reader, work
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)
// The non-final filters will modify the args.dst contents so
// that its history isn't what this.lzma considers its
// (unfiltered) history.
io_forget_history (io: args.dst) {
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)