summaryrefslogtreecommitdiff
path: root/xdelta3-fgk.h
diff options
context:
space:
mode:
authoryang.zhang <y0169.zhang@samsung.com>2016-05-18 11:25:47 +0800
committeryang.zhang <y0169.zhang@samsung.com>2016-05-18 11:27:16 +0800
commit41c06420b9ff028fd452cec19ac1412be665673f (patch)
treeece29e014e212b56654888fa3f95f50625164919 /xdelta3-fgk.h
parenta96d62621beefe4aa20b696744be6325bc536fb6 (diff)
downloadxdelta3-41c06420b9ff028fd452cec19ac1412be665673f.tar.gz
xdelta3-41c06420b9ff028fd452cec19ac1412be665673f.tar.bz2
xdelta3-41c06420b9ff028fd452cec19ac1412be665673f.zip
Change-Id: I8423a2e4bed8a15b862b6b1ab6f6371c92e78b3f
Diffstat (limited to 'xdelta3-fgk.h')
-rw-r--r--xdelta3-fgk.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/xdelta3-fgk.h b/xdelta3-fgk.h
index 81d5e7e..7011500 100644
--- a/xdelta3-fgk.h
+++ b/xdelta3-fgk.h
@@ -109,7 +109,7 @@ static fgk_stream* fgk_alloc (xd3_stream *stream /*, usize_t alpha
static int fgk_init (xd3_stream *stream,
fgk_stream *h,
int is_encode);
-static usize_t fgk_encode_data (fgk_stream *h,
+static int fgk_encode_data (fgk_stream *h,
usize_t n);
static inline fgk_bit fgk_get_encoded_bit (fgk_stream *h);
@@ -125,7 +125,7 @@ static int xd3_encode_fgk (xd3_stream *stream,
static inline int fgk_decode_bit (fgk_stream *h,
fgk_bit b);
-static usize_t fgk_decode_data (fgk_stream *h);
+static int fgk_decode_data (fgk_stream *h);
static void fgk_destroy (xd3_stream *stream,
fgk_stream *h);
@@ -234,7 +234,7 @@ static void fgk_swap_ptrs(fgk_node **one, fgk_node **two)
/* Takes huffman transmitter h and n, the nth elt in the alphabet, and
* returns the number of required to encode n. */
-static usize_t fgk_encode_data (fgk_stream* h, usize_t n)
+static int fgk_encode_data (fgk_stream* h, usize_t n)
{
fgk_node *target_ptr = h->alphabet + n;
@@ -249,8 +249,8 @@ static usize_t fgk_encode_data (fgk_stream* h, usize_t n)
* is not neccesary to encode these bits. */
if (IS_ADAPTIVE && target_ptr->weight == 0)
{
- usize_t where, shift;
- usize_t bits;
+ unsigned int where, shift;
+ int bits;
where = fgk_find_nth_zero(h, n);
shift = 1;
@@ -734,7 +734,7 @@ static usize_t fgk_nth_zero (fgk_stream* h, usize_t n)
* alphabet otherwise this returns 0, indicating more bits are
* required.
*/
-static usize_t fgk_decode_data (fgk_stream* h)
+static int fgk_decode_data (fgk_stream* h)
{
usize_t elt = (usize_t)(h->decode_ptr - h->alphabet);