aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-11-03 02:27:49 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-11-03 02:27:49 +0100
commit5e9934028aa030312a1a2e2e32d5ceade8672beb (patch)
tree52f384d6c8e695fa2be1dbbc0a7e21e85033f3b2 /include
parentdb5fe62b6d9977304b864f961dae71232091b26c (diff)
downloadbusybox-w32-5e9934028aa030312a1a2e2e32d5ceade8672beb.tar.gz
busybox-w32-5e9934028aa030312a1a2e2e32d5ceade8672beb.tar.bz2
busybox-w32-5e9934028aa030312a1a2e2e32d5ceade8672beb.zip
*: move lzo compressor code to archival/libunarchive/. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/liblzo_interface.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/liblzo_interface.h b/include/liblzo_interface.h
new file mode 100644
index 000000000..9a84c0b6b
--- /dev/null
+++ b/include/liblzo_interface.h
@@ -0,0 +1,71 @@
1/*
2 This file is part of the LZO real-time data compression library.
3
4 Copyright (C) 1996..2008 Markus Franz Xaver Johannes Oberhumer
5 All Rights Reserved.
6
7 Markus F.X.J. Oberhumer <markus@oberhumer.com>
8 http://www.oberhumer.com/opensource/lzo/
9
10 The LZO library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2 of
13 the License, or (at your option) any later version.
14
15 The LZO library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with the LZO library; see the file COPYING.
22 If not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 */
25
26#define LZO1X
27#undef LZO1Y
28
29#undef assert
30/*
31static void die_at(int line)
32{
33 bb_error_msg_and_die("internal error at %d", line);
34}
35#define assert(v) if (!(v)) die_at(__LINE__)
36*/
37#define assert(v) ((void)0)
38
39int lzo1x_1_compress(const uint8_t* src, unsigned src_len,
40 uint8_t* dst, unsigned* dst_len,
41 void* wrkmem);
42int lzo1x_1_15_compress(const uint8_t* src, unsigned src_len,
43 uint8_t* dst, unsigned* dst_len,
44 void* wrkmem);
45int lzo1x_999_compress_level(const uint8_t* in, unsigned in_len,
46 uint8_t* out, unsigned* out_len,
47 void* wrkmem,
48 int compression_level);
49
50/* decompression */
51//int lzo1x_decompress(const uint8_t* src, unsigned src_len,
52// uint8_t* dst, unsigned* dst_len,
53// void* wrkmem /* NOT USED */);
54/* safe decompression with overrun testing */
55int lzo1x_decompress_safe(const uint8_t* src, unsigned src_len,
56 uint8_t* dst, unsigned* dst_len,
57 void* wrkmem /* NOT USED */);
58
59#define LZO_E_OK 0
60#define LZO_E_ERROR (-1)
61#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
62#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
63#define LZO_E_INPUT_OVERRUN (-4)
64#define LZO_E_OUTPUT_OVERRUN (-5)
65#define LZO_E_LOOKBEHIND_OVERRUN (-6)
66#define LZO_E_EOF_NOT_FOUND (-7)
67#define LZO_E_INPUT_NOT_CONSUMED (-8)
68#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
69
70/* lzo-2.03/include/lzo/lzoconf.h */
71#define LZO_VERSION 0x2030