std/xz: implement apply_filter_04_x86

This commit is contained in:
Nigel Tao committed 2024-02-11 13:04:29 +11:00
1 parent 76a17ce742
commit d2a63a7e34
5 files changed
+248 -4

No files matched your search

+7 -3
View File
@@ -47,8 +47,9 @@ pub struct decoder? implements base.io_transformer(
block_has_compressed_size : base.bool,
block_has_uncompressed_size : base.bool,
bcj_undo_index : base.u8,
bcj_pos : base.u32,
bcj_undo_index : base.u8,
bcj_pos : base.u32,
bcj_x86_prev_mask : base.u32,
block_compressed_size : base.u64,
block_uncompressed_size : base.u64,
@@ -386,6 +387,7 @@ pri func decoder.decode_block_header_sans_padding?(src: base.io_reader) {
// Configure the non-final filters.
this.bcj_pos = 0
this.bcj_x86_prev_mask = 0
choose apply_non_final_filters = [apply_non_final_filters]
f = 0
while f < this.num_non_final_filters {
@@ -421,7 +423,9 @@ pri func decoder.decode_block_header_sans_padding?(src: base.io_reader) {
return "#unsupported filter combination"
} else {
this.filters[f] = filter_id as base.u32
if filter_id == 0x07 {
if filter_id == 0x04 {
choose apply_non_final_filters = [apply_filter_04_x86]
} else if filter_id == 0x07 {
choose apply_non_final_filters = [apply_filter_07_arm]
} else if filter_id == 0x08 {
choose apply_non_final_filters = [apply_filter_08_armthumb]