There are quite a few spelling mistakes and typos in comments and
user facing message literal strings as found using codespell. Fix
these.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fix the following build issue by initializing look_back_dist to 0.
igzip/igzip_inflate.c: In function ‘decode_huffman_code_block_stateless_base’:
igzip/igzip_inflate.c:1727:36:
warning: ‘look_back_dist’ may be used uninitialized [-Wmaybe-uninitialized]
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The relic slver is no longer used for individual versioning
on functions and is confusing tools looking for data in text
sections. This removes all instances instead of fixing since
its usefulness is waining. Fixes#221
Change-Id: Ife0b9f105950a90337c58e8a41ac2cffc0f67d99
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
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>
Clang with sanitizer on was catching on cast of static header.
Switching to uload64 macro for better general solution.
Change-Id: I495d440407bb1773841e2f7cdc48bd95fc1a2df4
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
Performance improvement for inflate to skip the time-consuming process of decode
table expansion when the header matches a known common dymanic one such as
produced by level 0 compression.
Change-Id: Ia2550b812a062b7cc2eb1b72bcb609f1a631e40b
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
Issue with reading header only appears when combined with new feature in cli of
multiple concatenated gzip files.
Change-Id: Id8df9150c6f27d8b22e810b511291f3fcf136723
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
Allow inflate to accept code 284 with extra bits 0x1f to be accepted
as a match of length 258. This matches zlib's behaviour.
Change-Id: Id85052ceea2b23d3db9c147672dd7996a4c66786
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Modify total_out to be total data decompressed into user supplied buffers,
rather than to user supplied and internal buffers.
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Initialize the lookup table so invalid lookups do not cause segfaults.
Change-Id: Ibb88c4c473fa233f8821c35b3e32ff62814c2b15
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Make inline functions in igzip_inflate.c static to fix compiling issue on Mac.
Change-Id: Id4fdc0b8fe9ea9655bc3368bade579aebc8c2a72
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Merge inflate.h and igzip_lib.h and rename many defines to avoid conflicts,
along with general cleanup of the new header.
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
Reviewed-by: Greg Tucker <greg.b.tucker@intel.com>