1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Header template for different match finders
6 // Copyright (C) 1999-2006 Igor Pavlov
7 // Copyright (C) 2007 Lasse Collin
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
19 ///////////////////////////////////////////////////////////////////////////////
21 #include "lz_encoder_private.h"
24 //////////////////////
25 // Global constants //
26 //////////////////////
29 #undef LZMA_FIX_HASH_SIZE
30 #undef LZMA_HASH_SIZE_C
31 #undef LZMA_FIX_HASH_SIZE_C
33 #define LZMA_HASH_SIZE(mf_name) LZMA_HASH_SIZE_C(mf_name)
34 #define LZMA_FIX_HASH_SIZE(mf_name) LZMA_FIX_HASH_SIZE_C(mf_name)
36 #define LZMA_HASH_SIZE_C(mf_name) \
37 const uint32_t LZMA_ ## mf_name ## _HASH_SIZE
39 #define LZMA_FIX_HASH_SIZE_C(mf_name) \
40 const uint32_t LZMA_ ## mf_name ## _FIX_HASH_SIZE
42 extern LZMA_HASH_SIZE(LZMA_MATCH_FINDER_NAME_UPPER);
43 extern LZMA_FIX_HASH_SIZE(LZMA_MATCH_FINDER_NAME_UPPER);
50 #undef LZMA_GET_MATCHES
52 #undef LZMA_GET_MATCHES_C
55 #define LZMA_GET_MATCHES(mf_name) LZMA_GET_MATCHES_C(mf_name)
56 #define LZMA_SKIP(mf_name) LZMA_SKIP_C(mf_name)
58 #define LZMA_GET_MATCHES_C(mf_name) \
59 extern void lzma_ ## mf_name ## _get_matches( \
60 lzma_lz_encoder *restrict lz, \
61 uint32_t *restrict distances)
63 #define LZMA_SKIP_C(mf_name) \
64 extern void lzma_ ## mf_name ## _skip( \
65 lzma_lz_encoder *lz, uint32_t num)
67 LZMA_GET_MATCHES(LZMA_MATCH_FINDER_NAME_LOWER);
69 LZMA_SKIP(LZMA_MATCH_FINDER_NAME_LOWER);