lzo: update to 2.09
[tomato.git] / release / src / router / lzo / src / lzo1y_1.c
blob5e1186b7e3da7483a28f5f8c2a97cd83e98cb270
1 /* lzo1y_1.c -- LZO1Y-1 compression
3 This file is part of the LZO real-time data compression library.
5 Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
6 All Rights Reserved.
8 The LZO library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 The LZO library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the LZO library; see the file COPYING.
20 If not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
25 http://www.oberhumer.com/opensource/lzo/
29 #include "lzo_conf.h"
30 #if 1 && defined(UA_GET_LE32)
31 #undef LZO_DICT_USE_PTR
32 #define LZO_DICT_USE_PTR 0
33 #undef lzo_dict_t
34 #define lzo_dict_t lzo_uint16_t
35 #endif
37 #define LZO_NEED_DICT_H 1
38 #ifndef D_BITS
39 #define D_BITS 14
40 #endif
41 #define D_INDEX1(d,p) d = DX3(p,5,5,6); d += d >> 5; d = DM(d)
42 #define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f)
43 #if 1
44 #define DINDEX(dv,p) DM(((DMUL(0x1824429d,dv)) >> (32-D_BITS)))
45 #else
46 #define DINDEX(dv,p) DM((dv) + ((dv) >> (32-D_BITS)))
47 #endif
48 #include "config1y.h"
49 #define LZO_DETERMINISTIC !(LZO_DICT_USE_PTR)
51 #ifndef DO_COMPRESS
52 #define DO_COMPRESS lzo1y_1_compress
53 #endif
55 #include "lzo1x_c.ch"
57 /* vim:set ts=4 sw=4 et: */