summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/xdelta3-internal.h')
-rw-r--r--xdelta3/xdelta3-internal.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/xdelta3/xdelta3-internal.h b/xdelta3/xdelta3-internal.h
index 773a8e4..d9d56b9 100644
--- a/xdelta3/xdelta3-internal.h
+++ b/xdelta3/xdelta3-internal.h
@@ -1,5 +1,5 @@
1/* xdelta3 - delta compression tools and library 1/* xdelta3 - delta compression tools and library
2 * Copyright (C) 2011, 2012 Joshua P. MacDonald 2 * Copyright (C) 2011, 2012, 2014 Joshua P. MacDonald
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -47,9 +47,6 @@ void main_free (void *ptr);
47int test_compare_files (const char* f0, const char* f1); 47int test_compare_files (const char* f0, const char* f1);
48usize_t xd3_bytes_on_srcblk (xd3_source *src, xoff_t blkno); 48usize_t xd3_bytes_on_srcblk (xd3_source *src, xoff_t blkno);
49xoff_t xd3_source_eof(const xd3_source *src); 49xoff_t xd3_source_eof(const xd3_source *src);
50uint32_t xd3_large_cksum_update (uint32_t cksum,
51 const uint8_t *base,
52 usize_t look);
53int xd3_encode_init_full (xd3_stream *stream); 50int xd3_encode_init_full (xd3_stream *stream);
54usize_t xd3_pow2_roundup (usize_t x); 51usize_t xd3_pow2_roundup (usize_t x);
55long get_millisecs_now (); 52long get_millisecs_now ();
@@ -158,18 +155,9 @@ void xprintf(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
158#define UINT64_MAX 18446744073709551615ULL 155#define UINT64_MAX 18446744073709551615ULL
159#endif 156#endif
160 157
161/* TODO Eliminate this framework... */
162#define HASH_PERMUTE 1 /* The input is permuted by random nums */
163#define ADLER_LARGE_CKSUM 1 /* Adler checksum vs. RK checksum */
164
165#if HASH_PERMUTE == 0
166#define PERMUTE(x) (x)
167#else
168#define PERMUTE(x) (__single_hash[x])
169
170extern const uint16_t __single_hash[256];
171#endif
172
173usize_t xd3_large_cksum (const uint8_t *seg, const usize_t ln); 158usize_t xd3_large_cksum (const uint8_t *seg, const usize_t ln);
159usize_t xd3_large_cksum_update (usize_t cksum,
160 const uint8_t *base,
161 usize_t look);
174 162
175#endif // XDELTA3_INTERNAL_H__ 163#endif /* XDELTA3_INTERNAL_H__ */