Commit Graph

124 Commits

Author SHA1 Message Date
Roy Oursler
f7b6e73146 igzip: Improve igzip_rand_test compress_multi_pass by modifying in buffer
Modify igzip_rand_test to test that data after next_in can be modified without
producing incorrect compressed data.

Change-Id: Ic6b62f269c6783407fbec7222ae73f24d3735717
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-10-20 15:29:39 -07:00
Greg Tucker
48d74d6e51 igzip: Fix perf test to only open dictionary if specified
Change-Id: Idf5048589af5b61da5ccccf25c575dfc05ea15ec
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-10-11 15:57:41 -07:00
Roy Oursler
e79c57c7e3 igzip: Fix issue with isal_create_hufftables_subset
isal_create_hufftables_subset failed to generate length symbols, but should
generate those symbols as a histogram does not guarantee finding all lengths
found in compression

Change-Id: I880210fe1b1078de8617cab0ecb93c9810b9c9de
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-09-21 17:24:56 -07:00
Greg Tucker
f78601adb9 igzip: Pick faster crc32 gzip function for sse4.2 machines
For machines with sse4.2 but not avx we can choose a faster version of
crc32_gzip. For highly compressible files using gzip format (rfc 1952) this can
be a significant advantage.

Change-Id: Ib699a68999290eed4b83f9bbf54dc6c304a5c445
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-09-20 10:50:16 -07:00
Peng Xiao
9099918dcb fixing huff_codes.c's compiling problem on CentOS 6.5 as gcc 4.4.7 only support C89
Signed-off-by: Peng Xiao <xiao.peng61@zte.com.cn>
2017-08-25 11:07:23 +00:00
Roy Oursler
aff6555226 igzip: Optimized deflate_hash
Optimize deflate hash by unrolling crc calculations.

Change-Id: Ief882910619a2cc3b052416d30499f6226e47419
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:42:37 -07:00
Roy Oursler
cf936f0d84 igzip: Remove igzip_sync_flush_perf
Remove igzip_sync_flush perf because the perf test does not give any new
information, and the data used does is not a representative work load.

Change-Id: I7b68f8b7c6da0944ace5a2a9e31db378135689ff
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:39:14 -07:00
Roy Oursler
80bfbb33df igzip: Remove DECLARE_ALIGNED and optimize structure layout
Change-Id: I95bc3b8e2e30aff0d596c743158337400c4eb486
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:35:44 -07:00
Greg Tucker
a7fad4b9d2 igzip: Change a few conflicting functions to static
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-08-18 14:34:14 -07:00
Roy Oursler
48d7def5d9 igzip: Fix inflate total_out behavior to align with expected behavior
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>
2017-08-18 14:28:10 -07:00
Xiaodong Liu
3ab8239097 multibinary: move WRT_OPT macro to common header
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
2017-08-18 14:24:57 -07:00
Roy Oursler
34c341db35 igzip: Add reset functions for both deflate and inflate.
Change-Id: I8677a4365ac5c2343751660176f3b2eb4746ddfe
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:14:44 -04:00
Xiaodong Liu
39ce870235 igzip: slver typo fix
Change-Id: I13e6d150d0c661ee6dda9c25162c9ade5136d367
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
2017-06-26 04:12:19 -04:00
Roy Oursler
ed15402f5b igzip: Add stateful dictionary support
Change-Id: I75dbac947787bc0041674468c88d0aa41b8b082f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:11:48 -04:00
Roy Oursler
1a7c640ef9 igzip: Fix 0 length file and looping errors in igzip_inflate_test
Change-Id: I328f241ba07d8a0ae4fbc4c7de2ea8913912a188
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:11:03 -04:00
Greg Tucker
a8966b6709 igzip: Add unit tests for adler and crc32_gzip
Also renamed test helper function, fixed clang warnings and adler usage.

Change-Id: I4ad22d046809483456608be1f4fdc4adbf0e09e4
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 04:03:35 -04:00
Greg Tucker
e1f5284ff8 igzip: Add sse optimized adler32 checksum
Change-Id: Id07727b8a8da4b41aa983b487ca881552d5190ee
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 04:01:29 -04:00
Greg Tucker
3025e83b91 igzip: Add avx2 optimized adler32 checksum
Change-Id: I019a38cf98836e3e6c7215a6914b85abb9399e33
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 03:56:49 -04:00
Roy Oursler
f4a5b303e2 igzip: Remove BITBUF8 and BITBUF_ELSE compile options
Change-Id: Iad3b2e6f9a32473b6e59910494c75d82558fc28e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 06:03:51 -04:00
Roy Oursler
edacadc8fb igzip: Modify encode_df_04 to behave more like encode_df_06 algorithm
Change-Id: I39c5d0d8182efb0fe8aa6bea97d9361df4ee8ddf
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 06:02:13 -04:00
Roy Oursler
5a55e3096c igzip: Avx512 version for encdode_df
Change-Id: I1625a3d7e016805791cfd09e31909562f432fd71
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:56:05 -04:00
Roy Oursler
b3c09b9b7c igzip: Improve random data generation in igzip-rand_test
Change-Id: I4835a9e376b4fa24080d765255703a959389487d
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:47:04 -04:00
Roy Oursler
64143a741e igzip: Implement type 0 blocks for level 1 compress
Change-Id: If55ab161623d29fa6fb08df3bc813e654918e592
2017-06-21 05:46:38 -04:00
Roy Oursler
87652b4489 igzip: Modify inflate to optionally calculate adler32 hash
Change-Id: I314617b89b59d53608e464c7d2cf299faa3528b5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:42:12 -04:00
Roy Oursler
0cc3d93758 igzip: Modify test to test zlib compression
Change-Id: I52979c9e572ef9703995adf8d2163ba1797b8f53
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:41:47 -04:00
Roy Oursler
4259169107 igzip: Implement zlib compression format
Change-Id: I3d3cca425a494ac629cea230de74e3d32fcaea79
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:41:05 -04:00
Hailiang Wang
52f644d3ff igzip:use fgetpos() to replace ftell() to get file's length.
Change-Id: Ia1f3c06e92c01da9d22b3d70b2b05fe4808c9f2c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
2017-06-21 05:22:07 -04:00
Hailiang Wang
ff9c0c1842 igzip:change the default max file size for 32-bit builds.
Change-Id: Ifab108250cfd06211843b5eccb1f1f0482669426
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
2017-06-21 05:13:24 -04:00
Greg Tucker
7e1a337433 igzip: Fix warnings from nasm 2.13
A few legitimate warnings got masked by previous nasm bugs.  This cleans last as
of nasm 2.13rc20.

Change-Id: Iaa7e6148e0e506222cc207685263103d62bdd015
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-04-19 10:17:24 -07:00
Greg Tucker
c28be0d306 igzip: Remove unnecessary casts causing warnings in 32bit build
Change-Id: I9fb85c097c9ade8fdc7907e9d6533d1997ccd406
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 20:22:36 -07:00
Greg Tucker
8270237457 igzip: Add decode_huffman_code_block_stateless to base aliases
Change-Id: I60558f5c09df354a1e7608fe479182ca4e10efb6
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:23:55 -07:00
Greg Tucker
dbab2ddad7 igzip: Make crc32_gzip_base standalone c function
Change-Id: Iffb55919fb51e9e3d74c5c5cb06a3011bd19e99b
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:22:20 -07:00
Greg Tucker
ec6e5de665 igzip: Move build_heap base functions to own file
Change-Id: I0161cd65c71df00fadad9dd69e207e9fb29a54ef
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:20:09 -07:00
Roy Oursler
f80a1ed62b igzip: Create base functions for build_heap and build_huff_tree
Change-Id: I19c2d7bbf1ac8270458b165a385c385a60f1cadc
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 18:18:14 -07:00
Greg Tucker
f316e96217 igzip: Add base function aliases and group src by arch
Change-Id: I4b6c8f62a09545d1ed4f48dc16b3fe8c8a5c72ea
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:16:36 -07:00
Roy Oursler
871ad43fad igzip: Fix bug in isal_deflate where processed is not calculated correctly.
Change-Id: I61e15a18ebe3130e73010337d2d41f59e2227f08
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:20:32 -07:00
Roy Oursler
be09e56b36 igzip: Modify igzip_example to provide example of higher compression levels
Change-Id: Iccd0528ac088e1eec3921aa5fde99769d75e3334
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:19:54 -07:00
Roy Oursler
13692d61a3 igzip: Fix bug when 0 length buffer is passed
Avoid unsigned addition overflow when avail_in = 0 and next_in = -1 causing a
comparison to be correct when it should not be.

Change-Id: I3ff7123a89867317f383931cc95c8738ba2f8d56
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:17:04 -07:00
Greg Tucker
de7d639ab1 igzip: Change zero length array and typos found in windows build
Change-Id: Ia185b600af3c5f3b34bb9411daae6877f99b05d7
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 17:15:57 -07:00
Greg Tucker
cd2146de95 igzip: Add missing file to dist list
Change-Id: I6dc920bbae9bd1800ba12e7174cdf6bc98f75489
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 17:15:14 -07:00
Roy Oursler
9992cc1920 igzip: Implement static header on level 1 compress
Change-Id: I0fe61eb6d3994a0977a4486a2a4cf21af38dc250
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:13:12 -07:00
Roy Oursler
e38ed4b54e igzip: Increase isal_mod_hist size to stop histogram overflow
Change-Id: I1c651c9625d0fb543cd89e53e2b78b391176ef68
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:11:51 -07:00
Roy Oursler
761b207376 igzip: delete generate_constant_block_header since it has not function
Change-Id: Id236f7a847f660b35165f9936850b3ff73609017
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:09:13 -07:00
Roy Oursler
91fef2d39c igzip: Fix generate_custom_huffcodes
Reimplement generate_custom_hufftables.c to avoid internal dependencies. Remove
the symbol subset feature since a default incomplete huffman code is dangerous
and that functionaly is available when generating custom huffman codes.

Change-Id: I014d8e127b49583fe7d6ac9ce861cc3138ffec46
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:58:37 -07:00
Roy Oursler
5d15580467 igzip: Modify stateless_file_perf to test compression levels
Change-Id: If628e7f949da6862b99cebe6a0a59c6e6d5443e4
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:56:13 -07:00
Roy Oursler
a41d352a03 igzip: Modify assembly functions and structs to work on Windows
Change-Id: Icd106c3330dec72601e6f03340c07c6e1d1b5794
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:55: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
7c7272e89c igzip: Optimize two pass first pass
Change-Id: I45efa8304f929d91238c8173c0fac00ec64ab323
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:53:26 -07:00
Roy Oursler
4725626847 igzip: Setup to allow encode_df to decode lit lit pairs.
Change-Id: Ic93797a09c5a908fc1c6005b40439978d7484773
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:52:21 -07:00
Roy Oursler
8a05e7d780 igzip: vecotorize encode_df_asm.asm
Change-Id: I11e005556e150a5bf8c6cc9410fa7d98196847f1
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 16:50:53 -07:00