Commit Graph

16 Commits

Author SHA1 Message Date
Marcel Cornu
55fbfabfc6 igzip: reformat using new code style
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2024-04-22 11:35:03 +02:00
Ilya Leoshkevich
d3cfb2fb77 Fix s390 build
The goal of this patch is to make isa-l testsuite pass on s390 with
minimal changes to the library. The one and only reason isa-l does not
work on s390 at the moment is that s390 is big-endian, and isa-l
assumes little-endian at a lot of places.

There are two flavors of this: loading/storing integers from/to
memory, and overlapping structs. Loads/stores are already helpfully
wrapped by unaligned.h header, so replace the functions there with
endianness-aware variants. Solve struct member overlap by reversing
their order on big-endian.

Also, fix a couple of usages of uninitialized memory in the testsuite
(found with MemorySanitizer).

Fixes s390x part of #188.

Change-Id: Iaf14a113bd266900192cc8b44212f8a47a8c7753
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
2022-01-04 11:06:17 -07:00
Roy Oursler
53b92e83f4 igzip: Avoid UB pointer arithmetic underflow for virtual file start
Change-Id: I95c0e6f004eaf70227a6419fc14bf0958d1f4538
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2019-03-07 09:27:50 -07:00
Roy Oursler
5be1ba2215 igzip: Remove undefined unaligned loads
Change-Id: I02591d958f8691d07b261218cf5ab361e8ad36c9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2019-03-07 09:27:50 -07:00
Roy Oursler
03bef684a4 igzip: Setup for variable hash mask
Change-Id: I3be94dbc40c2e02dcff4f89e5a9df8ed1f744f02
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-18 14:27:25 -07:00
Roy Oursler
6317ce2b78 igzip: Setup for variable lookback distance
Change-Id: Idd52c9392113dfc54feea3c66916a7f5aa128bef
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-18 14:27:25 -07:00
Roy Oursler
8965584ae3 igzip: Implement large hash table method as level 2
Move current level 2 compression to be level 3 and create a level 2
compression which is the same algorithm as level 1 but with a larger
hashtable.

Change-Id: I398a6017c2ff218dded24e229fb51c23ea69f314
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
7a12bcb2a8 igzip: Separate concept of level and compression method
Change-Id: I82a5fbeb93adc77057893c643e044e311e4f393c
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
fe68f02dac igzip: Move hash_table and symbol histogram for icf compression
Change-Id: I50df9c8915ff3e1af450aeb8e4c0cc3baf9624ae
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
06cd70481c igzip: Separate defines for LVL1 and LVL0 hash tables
Change-Id: I19bdec8d2d0c74083bc1695763c9630516995885
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
9203f96c2a igzip: Change inputs to deflate_hash functions
Change-Id: I9ffff9aee82d5d1ece51853b4709f13ccd80c8ad
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
4ae2d1be29 igzip: Implement optimized level 2 compression
Change-Id: I8cf5bcd56f290d17205ac36dc2828c8acfc66947
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
49156c3568 igzip: Implement block buffer
Change-Id: I9d7942740557e4ffaf8e223e190f4bd4e4f47b1e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
59b9990a39 igzip: Remove file_start from zstate
Change-Id: Ia4cb6dc86da54cc771f25a6d958bea730caa4801
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
f2c35a9fd4 igzip: Fix underflow bugs whe null pointer is passed in igzip base functions
Change-Id: Ia24326dcde6f8be9ee019690b8206d2779ddebb2
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:54:35 -07:00
Roy Oursler
01dfbcc484 igzip: implement igzip two pass
Change-Id: I9564b2da251a02197b39cab5f141e7aff1ae8439
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:50:48 -07:00