diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-29 12:01:51 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-29 12:01:51 +0000 |
commit | 052ad9a56883a56742cec1afc6c1c8dfff222495 (patch) | |
tree | c06321623bd51c725b559f3e91d1a9b736a26646 /archival/lzo1x_1.c | |
parent | c8653f62f2203d0377933c1b5f0442666e27f91a (diff) | |
download | busybox-w32-052ad9a56883a56742cec1afc6c1c8dfff222495.tar.gz busybox-w32-052ad9a56883a56742cec1afc6c1c8dfff222495.tar.bz2 busybox-w32-052ad9a56883a56742cec1afc6c1c8dfff222495.zip |
lzop: new applet. Busyboxed by Alain Knaff. +7700 bytes.
Diffstat (limited to 'archival/lzo1x_1.c')
-rw-r--r-- | archival/lzo1x_1.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/archival/lzo1x_1.c b/archival/lzo1x_1.c new file mode 100644 index 000000000..a88839846 --- /dev/null +++ b/archival/lzo1x_1.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* LZO1X-1 compression | ||
2 | |||
3 | This file is part of the LZO real-time data compression library. | ||
4 | |||
5 | Copyright (C) 1996..2008 Markus Franz Xaver Johannes Oberhumer | ||
6 | All Rights Reserved. | ||
7 | |||
8 | Markus F.X.J. Oberhumer <markus@oberhumer.com> | ||
9 | http://www.oberhumer.com/opensource/lzo/ | ||
10 | |||
11 | The LZO library is free software; you can redistribute it and/or | ||
12 | modify it under the terms of the GNU General Public License as | ||
13 | published by the Free Software Foundation; either version 2 of | ||
14 | the License, or (at your option) any later version. | ||
15 | |||
16 | The LZO library is distributed in the hope that it will be useful, | ||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | GNU General Public License for more details. | ||
20 | |||
21 | You should have received a copy of the GNU General Public License | ||
22 | along with the LZO library; see the file COPYING. | ||
23 | If not, write to the Free Software Foundation, Inc., | ||
24 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
25 | */ | ||
26 | #include "libbb.h" | ||
27 | #include "liblzo.h" | ||
28 | |||
29 | #define D_BITS 14 | ||
30 | #define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) | ||
31 | #define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) | ||
32 | |||
33 | #define DO_COMPRESS lzo1x_1_compress | ||
34 | |||
35 | #include "lzo1x_c.c" | ||