X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fxpress_decompress.c;h=9fd5ac5eb045512b67c31831ae5499aa7ee3626e;hp=ec5b1831cd27f24c18bf32a6a329a96b9af4ca26;hb=908381d2809a48acd9490ec080e51087ae1529fd;hpb=ed92ad52377e0ee686faec69ec5cbca291ab83c1 diff --git a/src/xpress_decompress.c b/src/xpress_decompress.c index ec5b1831..9fd5ac5e 100644 --- a/src/xpress_decompress.c +++ b/src/xpress_decompress.c @@ -6,7 +6,7 @@ /* * - * Copyright (C) 2012, 2013, 2015 Eric Biggers + * Copyright (C) 2012-2016 Eric Biggers * * This file is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free @@ -73,7 +73,7 @@ #include "wimlib/xpress_constants.h" /* This value is chosen for fast decompression. */ -#define XPRESS_TABLEBITS 12 +#define XPRESS_TABLEBITS 11 static int xpress_decompress(const void *restrict compressed_data, size_t compressed_size, @@ -85,8 +85,8 @@ xpress_decompress(const void *restrict compressed_data, size_t compressed_size, u8 *out_next = out_begin; u8 * const out_end = out_begin + uncompressed_size; union { - u16 decode_table[(1 << XPRESS_TABLEBITS) + 2 * XPRESS_NUM_SYMBOLS] - _aligned_attribute(DECODE_TABLE_ALIGNMENT); + DECODE_TABLE(decode_table, XPRESS_NUM_SYMBOLS, + XPRESS_TABLEBITS, XPRESS_MAX_CODEWORD_LEN); u8 lens[XPRESS_NUM_SYMBOLS]; } u; struct input_bitstream is;