libdeflate 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +34 -0
- data/README.md +1 -6
- data/ext/libdeflate/extconf.rb +18 -7
- data/ext/libdeflate/libdeflate_ext.c +17 -17
- data/lib/libdeflate/version.rb +1 -1
- data/libdeflate.gemspec +2 -1
- metadata +13 -84
- data/.gitmodules +0 -3
- data/.travis.yml +0 -5
- data/ext/libdeflate/libdeflate/.gitignore +0 -19
- data/ext/libdeflate/libdeflate/COPYING +0 -21
- data/ext/libdeflate/libdeflate/Makefile +0 -231
- data/ext/libdeflate/libdeflate/Makefile.msc +0 -64
- data/ext/libdeflate/libdeflate/NEWS +0 -57
- data/ext/libdeflate/libdeflate/README.md +0 -170
- data/ext/libdeflate/libdeflate/common/common_defs.h +0 -351
- data/ext/libdeflate/libdeflate/common/compiler_gcc.h +0 -134
- data/ext/libdeflate/libdeflate/common/compiler_msc.h +0 -95
- data/ext/libdeflate/libdeflate/lib/adler32.c +0 -213
- data/ext/libdeflate/libdeflate/lib/adler32_impl.h +0 -281
- data/ext/libdeflate/libdeflate/lib/aligned_malloc.c +0 -57
- data/ext/libdeflate/libdeflate/lib/aligned_malloc.h +0 -13
- data/ext/libdeflate/libdeflate/lib/bt_matchfinder.h +0 -357
- data/ext/libdeflate/libdeflate/lib/crc32.c +0 -368
- data/ext/libdeflate/libdeflate/lib/crc32_impl.h +0 -286
- data/ext/libdeflate/libdeflate/lib/crc32_table.h +0 -526
- data/ext/libdeflate/libdeflate/lib/decompress_impl.h +0 -404
- data/ext/libdeflate/libdeflate/lib/deflate_compress.c +0 -2817
- data/ext/libdeflate/libdeflate/lib/deflate_compress.h +0 -14
- data/ext/libdeflate/libdeflate/lib/deflate_constants.h +0 -66
- data/ext/libdeflate/libdeflate/lib/deflate_decompress.c +0 -889
- data/ext/libdeflate/libdeflate/lib/gzip_compress.c +0 -95
- data/ext/libdeflate/libdeflate/lib/gzip_constants.h +0 -45
- data/ext/libdeflate/libdeflate/lib/gzip_decompress.c +0 -130
- data/ext/libdeflate/libdeflate/lib/hc_matchfinder.h +0 -405
- data/ext/libdeflate/libdeflate/lib/lib_common.h +0 -35
- data/ext/libdeflate/libdeflate/lib/matchfinder_avx2.h +0 -53
- data/ext/libdeflate/libdeflate/lib/matchfinder_common.h +0 -205
- data/ext/libdeflate/libdeflate/lib/matchfinder_neon.h +0 -61
- data/ext/libdeflate/libdeflate/lib/matchfinder_sse2.h +0 -53
- data/ext/libdeflate/libdeflate/lib/unaligned.h +0 -202
- data/ext/libdeflate/libdeflate/lib/x86_cpu_features.c +0 -169
- data/ext/libdeflate/libdeflate/lib/x86_cpu_features.h +0 -48
- data/ext/libdeflate/libdeflate/lib/zlib_compress.c +0 -87
- data/ext/libdeflate/libdeflate/lib/zlib_constants.h +0 -21
- data/ext/libdeflate/libdeflate/lib/zlib_decompress.c +0 -91
- data/ext/libdeflate/libdeflate/libdeflate.h +0 -274
- data/ext/libdeflate/libdeflate/programs/benchmark.c +0 -558
- data/ext/libdeflate/libdeflate/programs/checksum.c +0 -197
- data/ext/libdeflate/libdeflate/programs/detect.sh +0 -62
- data/ext/libdeflate/libdeflate/programs/gzip.c +0 -603
- data/ext/libdeflate/libdeflate/programs/prog_util.c +0 -530
- data/ext/libdeflate/libdeflate/programs/prog_util.h +0 -162
- data/ext/libdeflate/libdeflate/programs/test_checksums.c +0 -135
- data/ext/libdeflate/libdeflate/programs/tgetopt.c +0 -118
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/Makefile +0 -12
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/deflate_compress/fuzz.c +0 -40
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/deflate_compress/inputs/0 +0 -0
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/deflate_decompress/fuzz.c +0 -28
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/deflate_decompress/inputs/0 +0 -3
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/gzip_decompress/fuzz.c +0 -28
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/gzip_decompress/inputs/0 +0 -0
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/prepare_for_fuzz.sh +0 -14
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/zlib_decompress/fuzz.c +0 -28
- data/ext/libdeflate/libdeflate/tools/afl-fuzz/zlib_decompress/inputs/0 +0 -3
- data/ext/libdeflate/libdeflate/tools/android_build.sh +0 -104
- data/ext/libdeflate/libdeflate/tools/checksum_benchmarks.sh +0 -76
- data/ext/libdeflate/libdeflate/tools/exec_tests.sh +0 -30
- data/ext/libdeflate/libdeflate/tools/gen_crc32_multipliers.c +0 -108
- data/ext/libdeflate/libdeflate/tools/gen_crc32_table.c +0 -100
- data/ext/libdeflate/libdeflate/tools/gzip_tests.sh +0 -412
- data/ext/libdeflate/libdeflate/tools/make-windows-releases +0 -21
- data/ext/libdeflate/libdeflate/tools/mips_build.sh +0 -9
- data/ext/libdeflate/libdeflate/tools/msc_test.bat +0 -3
- data/ext/libdeflate/libdeflate/tools/pgo_build.sh +0 -23
- data/ext/libdeflate/libdeflate/tools/produce_gzip_benchmark_table.sh +0 -37
- data/ext/libdeflate/libdeflate/tools/run_tests.sh +0 -305
- data/ext/libdeflate/libdeflate/tools/windows_build.sh +0 -10
@@ -1,14 +0,0 @@
|
|
1
|
-
#ifndef LIB_DEFLATE_COMPRESS_H
|
2
|
-
#define LIB_DEFLATE_COMPRESS_H
|
3
|
-
|
4
|
-
#include "lib_common.h"
|
5
|
-
|
6
|
-
/* DEFLATE compression is private to deflate_compress.c, but we do need to be
|
7
|
-
* able to query the compression level for zlib and gzip header generation. */
|
8
|
-
|
9
|
-
struct libdeflate_compressor;
|
10
|
-
|
11
|
-
extern unsigned int
|
12
|
-
deflate_get_compression_level(struct libdeflate_compressor *c);
|
13
|
-
|
14
|
-
#endif /* LIB_DEFLATE_COMPRESS_H */
|
@@ -1,66 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* deflate_constants.h - constants for the DEFLATE compression format
|
3
|
-
*/
|
4
|
-
|
5
|
-
#ifndef LIB_DEFLATE_CONSTANTS_H
|
6
|
-
#define LIB_DEFLATE_CONSTANTS_H
|
7
|
-
|
8
|
-
/* Valid block types */
|
9
|
-
#define DEFLATE_BLOCKTYPE_UNCOMPRESSED 0
|
10
|
-
#define DEFLATE_BLOCKTYPE_STATIC_HUFFMAN 1
|
11
|
-
#define DEFLATE_BLOCKTYPE_DYNAMIC_HUFFMAN 2
|
12
|
-
|
13
|
-
/* Minimum and maximum supported match lengths (in bytes) */
|
14
|
-
#define DEFLATE_MIN_MATCH_LEN 3
|
15
|
-
#define DEFLATE_MAX_MATCH_LEN 258
|
16
|
-
|
17
|
-
/* Minimum and maximum supported match offsets (in bytes) */
|
18
|
-
#define DEFLATE_MIN_MATCH_OFFSET 1
|
19
|
-
#define DEFLATE_MAX_MATCH_OFFSET 32768
|
20
|
-
|
21
|
-
#define DEFLATE_MAX_WINDOW_SIZE 32768
|
22
|
-
|
23
|
-
/* Number of symbols in each Huffman code. Note: for the literal/length
|
24
|
-
* and offset codes, these are actually the maximum values; a given block
|
25
|
-
* might use fewer symbols. */
|
26
|
-
#define DEFLATE_NUM_PRECODE_SYMS 19
|
27
|
-
#define DEFLATE_NUM_LITLEN_SYMS 288
|
28
|
-
#define DEFLATE_NUM_OFFSET_SYMS 32
|
29
|
-
|
30
|
-
/* The maximum number of symbols across all codes */
|
31
|
-
#define DEFLATE_MAX_NUM_SYMS 288
|
32
|
-
|
33
|
-
/* Division of symbols in the literal/length code */
|
34
|
-
#define DEFLATE_NUM_LITERALS 256
|
35
|
-
#define DEFLATE_END_OF_BLOCK 256
|
36
|
-
#define DEFLATE_NUM_LEN_SYMS 31
|
37
|
-
|
38
|
-
/* Maximum codeword length, in bits, within each Huffman code */
|
39
|
-
#define DEFLATE_MAX_PRE_CODEWORD_LEN 7
|
40
|
-
#define DEFLATE_MAX_LITLEN_CODEWORD_LEN 15
|
41
|
-
#define DEFLATE_MAX_OFFSET_CODEWORD_LEN 15
|
42
|
-
|
43
|
-
/* The maximum codeword length across all codes */
|
44
|
-
#define DEFLATE_MAX_CODEWORD_LEN 15
|
45
|
-
|
46
|
-
/* Maximum possible overrun when decoding codeword lengths */
|
47
|
-
#define DEFLATE_MAX_LENS_OVERRUN 137
|
48
|
-
|
49
|
-
/*
|
50
|
-
* Maximum number of extra bits that may be required to represent a match
|
51
|
-
* length or offset.
|
52
|
-
*
|
53
|
-
* TODO: are we going to have full DEFLATE64 support? If so, up to 16
|
54
|
-
* length bits must be supported.
|
55
|
-
*/
|
56
|
-
#define DEFLATE_MAX_EXTRA_LENGTH_BITS 5
|
57
|
-
#define DEFLATE_MAX_EXTRA_OFFSET_BITS 14
|
58
|
-
|
59
|
-
/* The maximum number of bits in which a match can be represented. This
|
60
|
-
* is the absolute worst case, which assumes the longest possible Huffman
|
61
|
-
* codewords and the maximum numbers of extra bits. */
|
62
|
-
#define DEFLATE_MAX_MATCH_BITS \
|
63
|
-
(DEFLATE_MAX_LITLEN_CODEWORD_LEN + DEFLATE_MAX_EXTRA_LENGTH_BITS + \
|
64
|
-
DEFLATE_MAX_OFFSET_CODEWORD_LEN + DEFLATE_MAX_EXTRA_OFFSET_BITS)
|
65
|
-
|
66
|
-
#endif /* LIB_DEFLATE_CONSTANTS_H */
|