| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent aee3b85 commit 90f9348
57 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,10 @@ | |||
| 29 | 29 | ], | |
| 30 | 30 | 'sources': [ | |
| 31 | 31 | # Common | |
| 32 | + 'c/common/constants.c', | ||
| 33 | + 'c/common/context.c', | ||
| 32 | 34 | 'c/common/dictionary.c', | |
| 35 | + 'c/common/platform.c', | ||
| 33 | 36 | 'c/common/transform.c', | |
| 34 | 37 | ||
| 35 | 38 | # Decoder | |
@@ -45,12 +48,14 @@ | |||
| 45 | 48 | 'c/enc/block_splitter.c', | |
| 46 | 49 | 'c/enc/brotli_bit_stream.c', | |
| 47 | 50 | 'c/enc/cluster.c', | |
| 51 | + 'c/enc/command.c', | ||
| 48 | 52 | 'c/enc/compress_fragment.c', | |
| 49 | 53 | 'c/enc/compress_fragment_two_pass.c', | |
| 50 | 54 | 'c/enc/dictionary_hash.c', | |
| 51 | 55 | 'c/enc/encode.c', | |
| 52 | 56 | 'c/enc/encoder_dict.c', | |
| 53 | 57 | 'c/enc/entropy_encode.c', | |
| 58 | + 'c/enc/fast_log.c', | ||
| 54 | 59 | 'c/enc/histogram.c', | |
| 55 | 60 | 'c/enc/literal_cost.c', | |
| 56 | 61 | 'c/enc/memory.c', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,15 @@ | |||
| 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 | + #include "./constants.h" | ||
| 8 | + | ||
| 9 | + const BrotliPrefixCodeRange | ||
| 10 | + _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS] = { | ||
| 11 | + {1, 2}, {5, 2}, {9, 2}, {13, 2}, {17, 3}, {25, 3}, | ||
| 12 | + {33, 3}, {41, 3}, {49, 4}, {65, 4}, {81, 4}, {97, 4}, | ||
| 13 | + {113, 5}, {145, 5}, {177, 5}, {209, 5}, {241, 6}, {305, 6}, | ||
| 14 | + {369, 7}, {497, 8}, {753, 9}, {1265, 10}, {2289, 11}, {4337, 12}, | ||
| 15 | + {8433, 13}, {16625, 24}}; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,9 +4,18 @@ | |||
| 4 | 4 | See file LICENSE for detail or copy at https://opensource.org/licenses/MIT | |
| 5 | 5 | */ | |
| 6 | 6 | ||
| 7 | + /** | ||
| 8 | + * @file | ||
| 9 | + * Common constants used in decoder and encoder API. | ||
| 10 | + */ | ||
| 11 | + | ||
| 7 | 12 | #ifndef BROTLI_COMMON_CONSTANTS_H_ | |
| 8 | 13 | #define BROTLI_COMMON_CONSTANTS_H_ | |
| 9 | 14 | ||
| 15 | + #include "./platform.h" | ||
| 16 | + #include <brotli/port.h> | ||
| 17 | + #include <brotli/types.h> | ||
| 18 | + | ||
| 10 | 19 | /* Specification: 7.3. Encoding of the context map */ | |
| 11 | 20 | #define BROTLI_CONTEXT_MAP_MAX_RLE 16 | |
| 12 | 21 | ||
@@ -29,12 +38,31 @@ | |||
| 29 | 38 | #define BROTLI_INITIAL_REPEATED_CODE_LENGTH 8 | |
| 30 | 39 | ||
| 31 | 40 | /* "Large Window Brotli" */ | |
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * The theoretical maximum number of distance bits specified for large window | ||
| 44 | + * brotli, for 64-bit encoders and decoders. Even when in practice 32-bit | ||
| 45 | + * encoders and decoders only support up to 30 max distance bits, the value is | ||
| 46 | + * set to 62 because it affects the large window brotli file format. | ||
| 47 | + * Specifically, it affects the encoding of simple huffman tree for distances, | ||
| 48 | + * see Specification RFC 7932 chapter 3.4. | ||
| 49 | + */ | ||
| 32 | 50 | #define BROTLI_LARGE_MAX_DISTANCE_BITS 62U | |
| 33 | 51 | #define BROTLI_LARGE_MIN_WBITS 10 | |
| 52 | + /** | ||
| 53 | + * The maximum supported large brotli window bits by the encoder and decoder. | ||
| 54 | + * Large window brotli allows up to 62 bits, however the current encoder and | ||
| 55 | + * decoder, designed for 32-bit integers, only support up to 30 bits maximum. | ||
| 56 | + */ | ||
| 34 | 57 | #define BROTLI_LARGE_MAX_WBITS 30 | |
| 35 | 58 | ||
| 36 | 59 | /* Specification: 4. Encoding of distances */ | |
| 37 | 60 | #define BROTLI_NUM_DISTANCE_SHORT_CODES 16 | |
| 61 | + /** | ||
| 62 | + * Maximal number of "postfix" bits. | ||
| 63 | + * | ||
| 64 | + * Number of "postfix" bits is stored as 2 bits in meta-block header. | ||
| 65 | + */ | ||
| 38 | 66 | #define BROTLI_MAX_NPOSTFIX 3 | |
| 39 | 67 | #define BROTLI_MAX_NDIRECT 120 | |
| 40 | 68 | #define BROTLI_MAX_DISTANCE_BITS 24U | |
@@ -45,9 +73,22 @@ | |||
| 45 | 73 | #define BROTLI_NUM_DISTANCE_SYMBOLS \ | |
| 46 | 74 | BROTLI_DISTANCE_ALPHABET_SIZE( \ | |
| 47 | 75 | BROTLI_MAX_NDIRECT, BROTLI_MAX_NPOSTFIX, BROTLI_LARGE_MAX_DISTANCE_BITS) | |
| 76 | + | ||
| 77 | + /* ((1 << 26) - 4) is the maximal distance that can be expressed in RFC 7932 | ||
| 78 | + brotli stream using NPOSTFIX = 0 and NDIRECT = 0. With other NPOSTFIX and | ||
| 79 | + NDIRECT values distances up to ((1 << 29) + 88) could be expressed. */ | ||
| 48 | 80 | #define BROTLI_MAX_DISTANCE 0x3FFFFFC | |
| 81 | + | ||
| 82 | + /* ((1 << 31) - 4) is the safe distance limit. Using this number as a limit | ||
| 83 | + allows safe distance calculation without overflows, given the distance | ||
| 84 | + alphabet size is limited to corresponding size | ||
| 85 | + (see kLargeWindowDistanceCodeLimits). */ | ||
| 49 | 86 | #define BROTLI_MAX_ALLOWED_DISTANCE 0x7FFFFFFC | |
| 50 | 87 | ||
| 88 | + | ||
| 89 | + /* Specification: 4. Encoding of Literal Insertion Lengths and Copy Lengths */ | ||
| 90 | + #define BROTLI_NUM_INS_COPY_CODES 24 | ||
| 91 | + | ||
| 51 | 92 | /* 7.1. Context modes and context ID lookup for literals */ | |
| 52 | 93 | /* "context IDs for literals are in the range of 0..63" */ | |
| 53 | 94 | #define BROTLI_LITERAL_CONTEXT_BITS 6 | |
@@ -61,4 +102,99 @@ | |||
| 61 | 102 | #define BROTLI_WINDOW_GAP 16 | |
| 62 | 103 | #define BROTLI_MAX_BACKWARD_LIMIT(W) (((size_t)1 << (W)) - BROTLI_WINDOW_GAP) | |
| 63 | 104 | ||
| 105 | + typedef struct BrotliDistanceCodeLimit { | ||
| 106 | + uint32_t max_alphabet_size; | ||
| 107 | + uint32_t max_distance; | ||
| 108 | + } BrotliDistanceCodeLimit; | ||
| 109 | + | ||
| 110 | + /* This function calculates maximal size of distance alphabet, such that the | ||
| 111 | + distances greater than the given values can not be represented. | ||
| 112 | + | ||
| 113 | + This limits are designed to support fast and safe 32-bit decoders. | ||
| 114 | + "32-bit" means that signed integer values up to ((1 << 31) - 1) could be | ||
| 115 | + safely expressed. | ||
| 116 | + | ||
| 117 | + Brotli distance alphabet symbols do not represent consecutive distance | ||
| 118 | + ranges. Each distance alphabet symbol (excluding direct distances and short | ||
| 119 | + codes), represent interleaved (for NPOSTFIX > 0) range of distances. | ||
| 120 | + A "group" of consecutive (1 << NPOSTFIX) symbols represent non-interleaved | ||
| 121 | + range. Two consecutive groups require the same amount of "extra bits". | ||
| 122 | + | ||
| 123 | + It is important that distance alphabet represents complete "groups". | ||
| 124 | + To avoid complex logic on encoder side about interleaved ranges | ||
| 125 | + it was decided to restrict both sides to complete distance code "groups". | ||
| 126 | + */ | ||
| 127 | + BROTLI_UNUSED_FUNCTION BrotliDistanceCodeLimit BrotliCalculateDistanceCodeLimit( | ||
| 128 | + uint32_t max_distance, uint32_t npostfix, uint32_t ndirect) { | ||
| 129 | + BrotliDistanceCodeLimit result; | ||
| 130 | + /* Marking this function as unused, because not all files | ||
| 131 | + including "constants.h" use it -> compiler warns about that. */ | ||
| 132 | + BROTLI_UNUSED(&BrotliCalculateDistanceCodeLimit); | ||
| 133 | + if (max_distance <= ndirect) { | ||
| 134 | + /* This case never happens / exists only for the sake of completeness. */ | ||
| 135 | + result.max_alphabet_size = max_distance + BROTLI_NUM_DISTANCE_SHORT_CODES; | ||
| 136 | + result.max_distance = max_distance; | ||
| 137 | + return result; | ||
| 138 | + } else { | ||
| 139 | + /* The first prohibited value. */ | ||
| 140 | + uint32_t forbidden_distance = max_distance + 1; | ||
| 141 | + /* Subtract "directly" encoded region. */ | ||
| 142 | + uint32_t offset = forbidden_distance - ndirect - 1; | ||
| 143 | + uint32_t ndistbits = 0; | ||
| 144 | + uint32_t tmp; | ||
| 145 | + uint32_t half; | ||
| 146 | + uint32_t group; | ||
| 147 | + /* Postfix for the last dcode in the group. */ | ||
| 148 | + uint32_t postfix = (1u << npostfix) - 1; | ||
| 149 | + uint32_t extra; | ||
| 150 | + uint32_t start; | ||
| 151 | + /* Remove postfix and "head-start". */ | ||
| 152 | + offset = (offset >> npostfix) + 4; | ||
| 153 | + /* Calculate the number of distance bits. */ | ||
| 154 | + tmp = offset / 2; | ||
| 155 | + /* Poor-man's log2floor, to avoid extra dependencies. */ | ||
| 156 | + while (tmp != 0) {ndistbits++; tmp = tmp >> 1;} | ||
| 157 | + /* One bit is covered with subrange addressing ("half"). */ | ||
| 158 | + ndistbits--; | ||
| 159 | + /* Find subrange. */ | ||
| 160 | + half = (offset >> ndistbits) & 1; | ||
| 161 | + /* Calculate the "group" part of dcode. */ | ||
| 162 | + group = ((ndistbits - 1) << 1) | half; | ||
| 163 | + /* Calculated "group" covers the prohibited distance value. */ | ||
| 164 | + if (group == 0) { | ||
| 165 | + /* This case is added for correctness; does not occur for limit > 128. */ | ||
| 166 | + result.max_alphabet_size = ndirect + BROTLI_NUM_DISTANCE_SHORT_CODES; | ||
| 167 | + result.max_distance = ndirect; | ||
| 168 | + return result; | ||
| 169 | + } | ||
| 170 | + /* Decrement "group", so it is the last permitted "group". */ | ||
| 171 | + group--; | ||
| 172 | + /* After group was decremented, ndistbits and half must be recalculated. */ | ||
| 173 | + ndistbits = (group >> 1) + 1; | ||
| 174 | + /* The last available distance in the subrange has all extra bits set. */ | ||
| 175 | + extra = (1u << ndistbits) - 1; | ||
| 176 | + /* Calculate region start. NB: ndistbits >= 1. */ | ||
| 177 | + start = (1u << (ndistbits + 1)) - 4; | ||
| 178 | + /* Move to subregion. */ | ||
| 179 | + start += (group & 1) << ndistbits; | ||
| 180 | + /* Calculate the alphabet size. */ | ||
| 181 | + result.max_alphabet_size = ((group << npostfix) | postfix) + ndirect + | ||
| 182 | + BROTLI_NUM_DISTANCE_SHORT_CODES + 1; | ||
| 183 | + /* Calculate the maximal distance representable by alphabet. */ | ||
| 184 | + result.max_distance = ((start + extra) << npostfix) + postfix + ndirect + 1; | ||
| 185 | + return result; | ||
| 186 | + } | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + /* Represents the range of values belonging to a prefix code: | ||
| 190 | + [offset, offset + 2^nbits) */ | ||
| 191 | + typedef struct { | ||
| 192 | + uint16_t offset; | ||
| 193 | + uint8_t nbits; | ||
| 194 | + } BrotliPrefixCodeRange; | ||
| 195 | + | ||
| 196 | + /* "Soft-private", it is exported, but not "advertised" as API. */ | ||
| 197 | + BROTLI_COMMON_API extern const BrotliPrefixCodeRange | ||
| 198 | + _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS]; | ||
| 199 | + | ||
| 64 | 200 | #endif /* BROTLI_COMMON_CONSTANTS_H_ */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,156 @@ | |||
| 1 | + #include "./context.h" | ||
| 2 | + | ||
| 3 | + #include <brotli/types.h> | ||
| 4 | + | ||
| 5 | + /* Common context lookup table for all context modes. */ | ||
| 6 | + const uint8_t _kBrotliContextLookupTable[2048] = { | ||
| 7 | + /* CONTEXT_LSB6, last byte. */ | ||
| 8 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | ||
| 9 | + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||
| 10 | + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | ||
| 11 | + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | ||
| 12 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | ||
| 13 | + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||
| 14 | + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | ||
| 15 | + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | ||
| 16 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | ||
| 17 | + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||
| 18 | + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | ||
| 19 | + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | ||
| 20 | + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | ||
| 21 | + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||
| 22 | + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, | ||
| 23 | + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, | ||
| 24 | + | ||
| 25 | + /* CONTEXT_LSB6, second last byte, */ | ||
| 26 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 27 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 28 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 29 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 30 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 31 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 32 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 33 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 34 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 35 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 36 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 37 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 38 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 39 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 40 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 41 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 42 | + | ||
| 43 | + /* CONTEXT_MSB6, last byte. */ | ||
| 44 | + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, | ||
| 45 | + 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, | ||
| 46 | + 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, | ||
| 47 | + 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, | ||
| 48 | + 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, | ||
| 49 | + 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, | ||
| 50 | + 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, | ||
| 51 | + 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, | ||
| 52 | + 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, | ||
| 53 | + 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, | ||
| 54 | + 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, | ||
| 55 | + 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, | ||
| 56 | + 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, | ||
| 57 | + 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, | ||
| 58 | + 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, | ||
| 59 | + 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, | ||
| 60 | + | ||
| 61 | + /* CONTEXT_MSB6, second last byte, */ | ||
| 62 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 63 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 64 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 65 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 66 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 67 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 68 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 69 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 70 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 71 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 72 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 73 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 74 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 75 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 76 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 77 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 78 | + | ||
| 79 | + /* CONTEXT_UTF8, last byte. */ | ||
| 80 | + /* ASCII range. */ | ||
| 81 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, | ||
| 82 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 83 | + 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, | ||
| 84 | + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12, | ||
| 85 | + 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48, | ||
| 86 | + 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12, | ||
| 87 | + 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56, | ||
| 88 | + 60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0, | ||
| 89 | + /* UTF8 continuation byte range. */ | ||
| 90 | + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, | ||
| 91 | + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, | ||
| 92 | + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, | ||
| 93 | + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, | ||
| 94 | + /* UTF8 lead byte range. */ | ||
| 95 | + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, | ||
| 96 | + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, | ||
| 97 | + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, | ||
| 98 | + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, | ||
| 99 | + | ||
| 100 | + /* CONTEXT_UTF8 second last byte. */ | ||
| 101 | + /* ASCII range. */ | ||
| 102 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 103 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 104 | + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 105 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, | ||
| 106 | + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 107 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, | ||
| 108 | + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, | ||
| 109 | + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 0, | ||
| 110 | + /* UTF8 continuation byte range. */ | ||
| 111 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 112 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 113 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 114 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 115 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 116 | + /* UTF8 lead byte range. */ | ||
| 117 | + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 118 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 119 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 120 | + | ||
| 121 | + /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ | ||
| 122 | + 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | ||
| 123 | + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, | ||
| 124 | + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, | ||
| 125 | + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, | ||
| 126 | + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
| 127 | + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
| 128 | + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
| 129 | + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
| 130 | + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||
| 131 | + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||
| 132 | + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||
| 133 | + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||
| 134 | + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, | ||
| 135 | + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, | ||
| 136 | + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, | ||
| 137 | + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56, | ||
| 138 | + | ||
| 139 | + /* CONTEXT_SIGNED, second last byte. */ | ||
| 140 | + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 141 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 142 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 143 | + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 144 | + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, | ||
| 145 | + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, | ||
| 146 | + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, | ||
| 147 | + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, | ||
| 148 | + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 149 | + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 150 | + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 151 | + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 152 | + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, | ||
| 153 | + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, | ||
| 154 | + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, | ||
| 155 | + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, | ||
| 156 | + }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments