From f66cff4f347fe66daa94685ebcde1df11c90714f Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Tue, 10 Aug 2010 18:03:40 -0700 Subject: [PATCH] --- yaml --- r: 208567 b: refs/heads/master c: dd21e9bdff14a9882f2c485fe533c6ce64ea2675 h: refs/heads/master i: 208565: 0bad03ec28f1950815be761b8c6167df02c4a194 208563: 6933f769cb25ea8ba1bc49ccb1288487de4479c7 208559: 2bc7c68b246ce8f7374c1ff97e670ff9de41127f v: v3 --- [refs] | 2 +- trunk/lib/decompress_bunzip2.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 185b891d748f..351262f907d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5bf2b19320ec31d094d7370fdf536f7fd91fd799 +refs/heads/master: dd21e9bdff14a9882f2c485fe533c6ce64ea2675 diff --git a/trunk/lib/decompress_bunzip2.c b/trunk/lib/decompress_bunzip2.c index a4e971dee102..81c8bb1cc6aa 100644 --- a/trunk/lib/decompress_bunzip2.c +++ b/trunk/lib/decompress_bunzip2.c @@ -107,6 +107,8 @@ struct bunzip_data { unsigned char selectors[32768]; /* nSelectors = 15 bits */ struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */ int io_error; /* non-zero if we have IO error */ + int byteCount[256]; + unsigned char symToByte[256], mtfSymbol[256]; }; @@ -158,14 +160,16 @@ static int INIT get_next_block(struct bunzip_data *bd) int *base = NULL; int *limit = NULL; int dbufCount, nextSym, dbufSize, groupCount, selector, - i, j, k, t, runPos, symCount, symTotal, nSelectors, - byteCount[256]; - unsigned char uc, symToByte[256], mtfSymbol[256], *selectors; + i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; + unsigned char uc, *symToByte, *mtfSymbol, *selectors; unsigned int *dbuf, origPtr; dbuf = bd->dbuf; dbufSize = bd->dbufSize; selectors = bd->selectors; + byteCount = bd->byteCount; + symToByte = bd->symToByte; + mtfSymbol = bd->mtfSymbol; /* Read in header signature and CRC, then validate signature. (last block signature means CRC is for whole file, return now) */