brotli 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +11 -3
- data/Gemfile +2 -0
- data/ext/brotli/brotli.c +279 -0
- data/ext/brotli/brotli.h +2 -0
- data/ext/brotli/buffer.c +95 -0
- data/ext/brotli/buffer.h +19 -0
- data/ext/brotli/extconf.rb +21 -81
- data/lib/brotli/version.rb +1 -1
- data/vendor/brotli/dec/bit_reader.c +5 -5
- data/vendor/brotli/dec/bit_reader.h +15 -15
- data/vendor/brotli/dec/context.h +1 -1
- data/vendor/brotli/dec/decode.c +433 -348
- data/vendor/brotli/dec/decode.h +74 -48
- data/vendor/brotli/dec/huffman.c +5 -4
- data/vendor/brotli/dec/huffman.h +4 -4
- data/vendor/brotli/dec/port.h +2 -95
- data/vendor/brotli/dec/prefix.h +5 -3
- data/vendor/brotli/dec/state.c +15 -27
- data/vendor/brotli/dec/state.h +21 -17
- data/vendor/brotli/dec/transform.h +1 -1
- data/vendor/brotli/enc/backward_references.c +892 -0
- data/vendor/brotli/enc/backward_references.h +85 -102
- data/vendor/brotli/enc/backward_references_inc.h +147 -0
- data/vendor/brotli/enc/bit_cost.c +35 -0
- data/vendor/brotli/enc/bit_cost.h +23 -121
- data/vendor/brotli/enc/bit_cost_inc.h +127 -0
- data/vendor/brotli/enc/block_encoder_inc.h +33 -0
- data/vendor/brotli/enc/block_splitter.c +197 -0
- data/vendor/brotli/enc/block_splitter.h +40 -50
- data/vendor/brotli/enc/block_splitter_inc.h +432 -0
- data/vendor/brotli/enc/brotli_bit_stream.c +1334 -0
- data/vendor/brotli/enc/brotli_bit_stream.h +95 -167
- data/vendor/brotli/enc/cluster.c +56 -0
- data/vendor/brotli/enc/cluster.h +23 -305
- data/vendor/brotli/enc/cluster_inc.h +315 -0
- data/vendor/brotli/enc/command.h +83 -76
- data/vendor/brotli/enc/compress_fragment.c +747 -0
- data/vendor/brotli/enc/compress_fragment.h +48 -37
- data/vendor/brotli/enc/compress_fragment_two_pass.c +557 -0
- data/vendor/brotli/enc/compress_fragment_two_pass.h +37 -26
- data/vendor/brotli/enc/compressor.cc +139 -0
- data/vendor/brotli/enc/compressor.h +146 -0
- data/vendor/brotli/enc/context.h +102 -96
- data/vendor/brotli/enc/dictionary_hash.h +9 -5
- data/vendor/brotli/enc/encode.c +1562 -0
- data/vendor/brotli/enc/encode.h +211 -199
- data/vendor/brotli/enc/encode_parallel.cc +161 -151
- data/vendor/brotli/enc/encode_parallel.h +7 -8
- data/vendor/brotli/enc/entropy_encode.c +501 -0
- data/vendor/brotli/enc/entropy_encode.h +107 -89
- data/vendor/brotli/enc/entropy_encode_static.h +29 -62
- data/vendor/brotli/enc/fast_log.h +26 -20
- data/vendor/brotli/enc/find_match_length.h +23 -20
- data/vendor/brotli/enc/hash.h +614 -871
- data/vendor/brotli/enc/hash_forgetful_chain_inc.h +249 -0
- data/vendor/brotli/enc/hash_longest_match_inc.h +241 -0
- data/vendor/brotli/enc/hash_longest_match_quickly_inc.h +230 -0
- data/vendor/brotli/enc/histogram.c +95 -0
- data/vendor/brotli/enc/histogram.h +49 -83
- data/vendor/brotli/enc/histogram_inc.h +51 -0
- data/vendor/brotli/enc/literal_cost.c +178 -0
- data/vendor/brotli/enc/literal_cost.h +16 -10
- data/vendor/brotli/enc/memory.c +181 -0
- data/vendor/brotli/enc/memory.h +62 -0
- data/vendor/brotli/enc/metablock.c +515 -0
- data/vendor/brotli/enc/metablock.h +87 -57
- data/vendor/brotli/enc/metablock_inc.h +183 -0
- data/vendor/brotli/enc/port.h +73 -47
- data/vendor/brotli/enc/prefix.h +34 -61
- data/vendor/brotli/enc/quality.h +130 -0
- data/vendor/brotli/enc/ringbuffer.h +137 -122
- data/vendor/brotli/enc/{static_dict.cc → static_dict.c} +162 -139
- data/vendor/brotli/enc/static_dict.h +23 -18
- data/vendor/brotli/enc/static_dict_lut.h +11223 -12037
- data/vendor/brotli/enc/streams.cc +7 -7
- data/vendor/brotli/enc/streams.h +32 -32
- data/vendor/brotli/enc/{utf8_util.cc → utf8_util.c} +22 -20
- data/vendor/brotli/enc/utf8_util.h +16 -9
- data/vendor/brotli/enc/write_bits.h +49 -43
- metadata +34 -25
- data/ext/brotli/brotli.cc +0 -181
- data/vendor/brotli/dec/Makefile +0 -12
- data/vendor/brotli/dec/dictionary.c +0 -9466
- data/vendor/brotli/dec/dictionary.h +0 -38
- data/vendor/brotli/dec/types.h +0 -38
- data/vendor/brotli/enc/Makefile +0 -14
- data/vendor/brotli/enc/backward_references.cc +0 -858
- data/vendor/brotli/enc/block_splitter.cc +0 -505
- data/vendor/brotli/enc/brotli_bit_stream.cc +0 -1181
- data/vendor/brotli/enc/compress_fragment.cc +0 -701
- data/vendor/brotli/enc/compress_fragment_two_pass.cc +0 -524
- data/vendor/brotli/enc/dictionary.cc +0 -9466
- data/vendor/brotli/enc/dictionary.h +0 -41
- data/vendor/brotli/enc/encode.cc +0 -1180
- data/vendor/brotli/enc/entropy_encode.cc +0 -480
- data/vendor/brotli/enc/histogram.cc +0 -67
- data/vendor/brotli/enc/literal_cost.cc +0 -165
- data/vendor/brotli/enc/metablock.cc +0 -539
- data/vendor/brotli/enc/transform.h +0 -248
- data/vendor/brotli/enc/types.h +0 -29
@@ -1,38 +0,0 @@
|
|
1
|
-
/* Copyright 2013 Google Inc. All Rights Reserved.
|
2
|
-
|
3
|
-
Distributed under MIT license.
|
4
|
-
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
5
|
-
*/
|
6
|
-
|
7
|
-
/* Collection of static dictionary words. */
|
8
|
-
|
9
|
-
#ifndef BROTLI_DEC_DICTIONARY_H_
|
10
|
-
#define BROTLI_DEC_DICTIONARY_H_
|
11
|
-
|
12
|
-
#include "./types.h"
|
13
|
-
|
14
|
-
#if defined(__cplusplus) || defined(c_plusplus)
|
15
|
-
extern "C" {
|
16
|
-
#endif
|
17
|
-
|
18
|
-
extern const uint8_t kBrotliDictionary[122784];
|
19
|
-
|
20
|
-
static const uint32_t kBrotliDictionaryOffsetsByLength[] = {
|
21
|
-
0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248, 63488, 74752, 87040,
|
22
|
-
93696, 100864, 104704, 106752, 108928, 113536, 115968, 118528, 119872, 121280,
|
23
|
-
122016
|
24
|
-
};
|
25
|
-
|
26
|
-
static const uint8_t kBrotliDictionarySizeBitsByLength[] = {
|
27
|
-
0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10,
|
28
|
-
9, 9, 8, 7, 7, 8, 7, 7, 6, 6, 5, 5,
|
29
|
-
};
|
30
|
-
|
31
|
-
static const int kBrotliMinDictionaryWordLength = 4;
|
32
|
-
static const int kBrotliMaxDictionaryWordLength = 24;
|
33
|
-
|
34
|
-
#if defined(__cplusplus) || defined(c_plusplus)
|
35
|
-
} /* extern "C" */
|
36
|
-
#endif
|
37
|
-
|
38
|
-
#endif /* BROTLI_DEC_DICTIONARY_H_ */
|
data/vendor/brotli/dec/types.h
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
/* Copyright 2013 Google Inc. All Rights Reserved.
|
2
|
-
|
3
|
-
Distributed under MIT license.
|
4
|
-
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
5
|
-
*/
|
6
|
-
|
7
|
-
/* Common types */
|
8
|
-
|
9
|
-
#ifndef BROTLI_DEC_TYPES_H_
|
10
|
-
#define BROTLI_DEC_TYPES_H_
|
11
|
-
|
12
|
-
#include <stddef.h> /* for size_t */
|
13
|
-
|
14
|
-
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
15
|
-
typedef __int8 int8_t;
|
16
|
-
typedef unsigned __int8 uint8_t;
|
17
|
-
typedef __int16 int16_t;
|
18
|
-
typedef unsigned __int16 uint16_t;
|
19
|
-
typedef __int32 int32_t;
|
20
|
-
typedef unsigned __int32 uint32_t;
|
21
|
-
typedef unsigned __int64 uint64_t;
|
22
|
-
typedef __int64 int64_t;
|
23
|
-
#else
|
24
|
-
#include <stdint.h>
|
25
|
-
#endif /* defined(_MSC_VER) && (_MSC_VER < 1600) */
|
26
|
-
|
27
|
-
/* Allocating function pointer. Function MUST return 0 in the case of failure.
|
28
|
-
Otherwise it MUST return a valid pointer to a memory region of at least
|
29
|
-
size length. Neither items nor size are allowed to be 0.
|
30
|
-
opaque argument is a pointer provided by client and could be used to bind
|
31
|
-
function to specific object (memory pool). */
|
32
|
-
typedef void* (*brotli_alloc_func)(void* opaque, size_t size);
|
33
|
-
|
34
|
-
/* Deallocating function pointer. Function SHOULD be no-op in the case the
|
35
|
-
address is 0. */
|
36
|
-
typedef void (*brotli_free_func)(void* opaque, void* address);
|
37
|
-
|
38
|
-
#endif /* BROTLI_DEC_TYPES_H_ */
|
data/vendor/brotli/enc/Makefile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#brotli/enc
|
2
|
-
|
3
|
-
include ../shared.mk
|
4
|
-
|
5
|
-
OBJS_NODICT = backward_references.o block_splitter.o brotli_bit_stream.o compress_fragment.o compress_fragment_two_pass.o encode.o encode_parallel.o entropy_encode.o histogram.o literal_cost.o metablock.o static_dict.o streams.o utf8_util.o
|
6
|
-
OBJS = $(OBJS_NODICT) dictionary.o
|
7
|
-
|
8
|
-
nodict : $(OBJS_NODICT)
|
9
|
-
|
10
|
-
all : $(OBJS)
|
11
|
-
|
12
|
-
clean :
|
13
|
-
rm -f $(OBJS) $(SO)
|
14
|
-
|