aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-08-24 13:29:48 +0200
committerGitHub <noreply@github.com>2017-08-24 13:29:48 +0200
commit653543541319e2318d2fc572cf5c7f3275b9c12c (patch)
tree171c39078ed1944327083e7125bc2ee59160e67e /c
parent4f455cac329d0c612887123c9dc6de9a66fa8490 (diff)
downloadbrotli-653543541319e2318d2fc572cf5c7f3275b9c12c.zip
brotli-653543541319e2318d2fc572cf5c7f3275b9c12c.tar.gz
brotli-653543541319e2318d2fc572cf5c7f3275b9c12c.tar.bz2
Update (#589)
* cleanup * fix `unbrotli` CLI * Java retouch for faster JS decoder
Diffstat (limited to 'c')
-rw-r--r--c/dec/decode.c2
-rwxr-xr-xc/enc/hash_to_binary_tree_inc.h4
-rwxr-xr-xc/tools/brotli.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/c/dec/decode.c b/c/dec/decode.c
index fa5fe48..be8de42 100644
--- a/c/dec/decode.c
+++ b/c/dec/decode.c
@@ -1260,8 +1260,6 @@ static void BROTLI_NOINLINE WrapRingBuffer(BrotliDecoderState* s) {
Last two bytes of ring-buffer are initialized to 0, so context calculation
could be done uniformly for the first two and all other positions.
-
- Custom dictionary, if any, is copied to the end of ring-buffer.
*/
static BROTLI_BOOL BROTLI_NOINLINE BrotliEnsureRingBuffer(
BrotliDecoderState* s) {
diff --git a/c/enc/hash_to_binary_tree_inc.h b/c/enc/hash_to_binary_tree_inc.h
index 1530c1b..30c71b5 100755
--- a/c/enc/hash_to_binary_tree_inc.h
+++ b/c/enc/hash_to_binary_tree_inc.h
@@ -20,7 +20,9 @@
#define BUCKET_SIZE (1 << BUCKET_BITS)
static BROTLI_INLINE size_t FN(HashTypeLength)(void) { return 4; }
-static BROTLI_INLINE size_t FN(StoreLookahead)(void) { return MAX_TREE_COMP_LENGTH; }
+static BROTLI_INLINE size_t FN(StoreLookahead)(void) {
+ return MAX_TREE_COMP_LENGTH;
+}
static uint32_t FN(HashBytes)(const uint8_t *data) {
uint32_t h = BROTLI_UNALIGNED_LOAD32(data) * kHashMul32;
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index fe20e0d..557ec93 100755
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -146,7 +146,7 @@ static Command ParseAlias(const char* name) {
size_t unbrotli_len = strlen(unbrotli);
name = FileName(name);
/* Partial comparison. On Windows there could be ".exe" suffix. */
- if (strncmp(name, unbrotli, unbrotli_len)) {
+ if (strncmp(name, unbrotli, unbrotli_len) == 0) {
char terminator = name[unbrotli_len];
if (terminator == 0 || terminator == '.') return COMMAND_DECOMPRESS;
}