summaryrefslogtreecommitdiff
path: root/src/support/huffman.c
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@wiredtiger.com>2011-06-12 09:14:06 -0400
committerKeith Bostic <keith.bostic@wiredtiger.com>2011-06-12 09:14:06 -0400
commit94a5b66b89e2697462ab4724d1208867ebcc8c66 (patch)
tree6c5a9e05b1791a60f83cb60f756f3bf07628bc85 /src/support/huffman.c
parent9153d815d88e298b7c91973d7d13f7859790a8f1 (diff)
downloadmongo-94a5b66b89e2697462ab4724d1208867ebcc8c66.tar.gz
Support large objects (bit count variables need to be 64 bit).
Diffstat (limited to 'src/support/huffman.c')
-rw-r--r--src/support/huffman.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/support/huffman.c b/src/support/huffman.c
index 2a6c505e830..a30d0b7b971 100644
--- a/src/support/huffman.c
+++ b/src/support/huffman.c
@@ -602,10 +602,10 @@ __wt_huffman_encode(WT_SESSION_IMPL *session, void *huffman_arg,
WT_BUF *tmp;
WT_HUFFMAN_CODE code;
WT_HUFFMAN_OBJ *huffman;
- uint32_t max_len, outlen, bitpos, bytes;
- uint8_t symbol;
+ uint64_t bitpos;
+ uint32_t max_len, outlen, bytes;
const uint8_t *from;
- uint8_t len, padding_info, *out;
+ uint8_t len, *out, padding_info, symbol;
int ret;
/*
@@ -740,12 +740,11 @@ __wt_huffman_decode(WT_SESSION_IMPL *session, void *huffman_arg,
{
WT_BUF *tmp;
WT_HUFFMAN_OBJ *huffman;
- uint32_t bits, from_bytes, from_len_bits, len, mask, max, max_len;
- uint32_t outlen;
+ uint64_t from_len_bits;
+ uint32_t bits, from_bytes, len, mask, max, max_len, outlen;
uint16_t pattern;
- uint8_t symbol;
const uint8_t *from;
- uint8_t padding_info, *to, valid;
+ uint8_t padding_info, symbol, *to, valid;
int ret;
huffman = huffman_arg;