]> wimlib.net Git - wimlib/commitdiff
lz_hash.h: remove unused code
authorEric Biggers <ebiggers3@gmail.com>
Sat, 19 Sep 2015 18:56:11 +0000 (13:56 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 27 Sep 2015 14:41:27 +0000 (09:41 -0500)
include/wimlib/bt_matchfinder.h
include/wimlib/lz_hash.h

index 8a69bca4acfed21bdbde39013e53711e7d4f0ff7..c2fa8b8297b1a94deaed2a6aef1e9679587aaadb 100644 (file)
@@ -147,7 +147,7 @@ TEMPLATED(bt_matchfinder_advance_one_byte)(struct TEMPLATED(bt_matchfinder) * co
        u32 len;
        u32 best_len = 2;
 
        u32 len;
        u32 best_len = 2;
 
-       if (unlikely(max_len < LZ_HASH3_REQUIRED_NBYTES + 1)) {
+       if (unlikely(max_len < LOAD_U24_REQUIRED_NBYTES + 1)) {
                *best_len_ret = best_len;
                return lz_matchptr;
        }
                *best_len_ret = best_len;
                return lz_matchptr;
        }
index 5aa4eff5d34319677f1a42e4bca6bf6ff132fd6d..464c01af2c29e9a84a57a8b97195854417572a22 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _LZ_HASH_H
 #define _LZ_HASH_H
 
 #ifndef _LZ_HASH_H
 #define _LZ_HASH_H
 
-#include "wimlib/unaligned.h"
+#include "wimlib/types.h"
 
 /*
  * The hash function: given a sequence prefix held in the low-order bits of a
 
 /*
  * The hash function: given a sequence prefix held in the low-order bits of a
@@ -28,33 +28,4 @@ lz_hash(u32 seq, unsigned num_bits)
        return (u32)(seq * 0x1E35A7BD) >> (32 - num_bits);
 }
 
        return (u32)(seq * 0x1E35A7BD) >> (32 - num_bits);
 }
 
-/*
- * Hash the 2-byte sequence beginning at @p, producing a hash of length
- * @num_bits bits.  At least 2 bytes of data must be available at @p.
- */
-static inline u32
-lz_hash_2_bytes(const u8 *p, unsigned num_bits)
-{
-       u32 seq = load_u16_unaligned(p);
-       if (num_bits >= 16)
-               return seq;
-       return lz_hash(seq, num_bits);
-}
-
-/*
- * Hash the 3-byte sequence beginning at @p, producing a hash of length
- * @num_bits bits.  At least LZ_HASH3_REQUIRED_NBYTES bytes of data must be
- * available at @p; note that this may be more than 3.
- */
-static inline u32
-lz_hash_3_bytes(const u8 *p, unsigned num_bits)
-{
-       u32 seq = load_u24_unaligned(p);
-       if (num_bits >= 24)
-               return seq;
-       return lz_hash(seq, num_bits);
-}
-
-#define LZ_HASH3_REQUIRED_NBYTES LOAD_U24_REQUIRED_NBYTES
-
 #endif /* _LZ_HASH_H */
 #endif /* _LZ_HASH_H */