diff options
author | yang.zhang <y0169.zhang@samsung.com> | 2016-05-18 11:25:47 +0800 |
---|---|---|
committer | yang.zhang <y0169.zhang@samsung.com> | 2016-05-18 11:27:16 +0800 |
commit | 41c06420b9ff028fd452cec19ac1412be665673f (patch) | |
tree | ece29e014e212b56654888fa3f95f50625164919 /xdelta3-fgk.h | |
parent | a96d62621beefe4aa20b696744be6325bc536fb6 (diff) | |
download | xdelta3-41c06420b9ff028fd452cec19ac1412be665673f.tar.gz xdelta3-41c06420b9ff028fd452cec19ac1412be665673f.tar.bz2 xdelta3-41c06420b9ff028fd452cec19ac1412be665673f.zip |
Imported upstream 3.0.8HEADsubmit/trunk/20191101.102136submit/trunk/20191030.112603submit/trunk/20191017.233826submit/trunk/20191017.111201submit/trunk/20190927.012842accepted/tools/devbase/tools/legacy/20240424.050617accepted/tools/devbase/tools/legacy/20240423.040635accepted/tools/devbase/tools/legacy/20240422.110744accepted/tizen/devbase/tools/20190927.044910spin-release-latestrelease-20161231release-20160930release-20160615release-20160531masterdevel_psk_20160727develaccepted/tools_devbase_tools_legacyaccepted/tizen_devbase_tools
Change-Id: I8423a2e4bed8a15b862b6b1ab6f6371c92e78b3f
Diffstat (limited to 'xdelta3-fgk.h')
-rw-r--r-- | xdelta3-fgk.h | 12 |
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); |