• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D27-Aug-201917.7 KiB340281

README.LZOH A D27-Aug-20193.9 KiB12491

lzoconf.hH A D27-Aug-201915.2 KiB445285

lzodefs.hH A D27-Aug-2019113.8 KiB2,9992,966

minilzo.cH A D27-Aug-2019196.9 KiB6,0545,763

minilzo.hH A D27-Aug-20192.7 KiB9533

README.LZO

1
2 ============================================================================
3 miniLZO -- mini subset of the LZO real-time data compression library
4 ============================================================================
5
6 Author  : Markus Franz Xaver Johannes Oberhumer
7           <markus@oberhumer.com>
8           http://www.oberhumer.com/opensource/lzo/
9 Version : 2.08
10 Date    : 29 Jun 2014
11
12 I've created miniLZO for projects where it is inconvenient to
13 include (or require) the full LZO source code just because you
14 want to add a little bit of data compression to your application.
15
16 miniLZO implements the LZO1X-1 compressor and both the standard and
17 safe LZO1X decompressor. Apart from fast compression it also useful
18 for situations where you want to use pre-compressed data files (which
19 must have been compressed with LZO1X-999).
20
21 miniLZO consists of one C source file and three header files:
22    minilzo.c
23    minilzo.h, lzoconf.h, lzodefs.h
24
25 To use miniLZO just copy these files into your source directory, add
26 minilzo.c to your Makefile and #include minilzo.h from your program.
27 Note: you also must distribute this file ('README.LZO') with your project.
28
29 minilzo.o compiles to about 6 KiB (using gcc or Visual C on an i386), and
30 the sources are about 30 KiB when packed with zip - so there's no more
31 excuse that your application doesn't support data compression :-)
32
33 For more information, documentation, example programs and other support
34 files (like Makefiles and build scripts) please download the full LZO
35 package from
36    http://www.oberhumer.com/opensource/lzo/
37
38 Have fun,
39  Markus
40
41
42 P.S. minilzo.c is generated automatically from the LZO sources and
43      therefore functionality is completely identical
44
45
46 Appendix A: building miniLZO
47 ----------------------------
48 miniLZO is written such a way that it should compile and run
49 out-of-the-box on most machines.
50
51 If you are running on a very unusual architecture and lzo_init() fails then
52 you should first recompile with '-DLZO_DEBUG' to see what causes the failure.
53 The most probable case is something like 'sizeof(void *) != sizeof(size_t)'.
54 After identifying the problem you can compile by adding some defines
55 like '-DSIZEOF_VOID_P=8' to your Makefile.
56
57 The best solution is (of course) using Autoconf - if your project uses
58 Autoconf anyway just add '-DMINILZO_HAVE_CONFIG_H' to your compiler
59 flags when compiling minilzo.c. See the LZO distribution for an example
60 how to set up configure.ac.
61
62
63 Appendix B: list of public functions available in miniLZO
64 ---------------------------------------------------------
65 Library initialization
66    lzo_init()
67
68 Compression
69    lzo1x_1_compress()
70
71 Decompression
72    lzo1x_decompress()
73    lzo1x_decompress_safe()
74
75 Checksum functions
76    lzo_adler32()
77
78 Version functions
79    lzo_version()
80    lzo_version_string()
81    lzo_version_date()
82
83 Portable (but slow) string functions
84    lzo_memcmp()
85    lzo_memcpy()
86    lzo_memmove()
87    lzo_memset()
88
89
90 Appendix C: suggested macros for 'configure.ac' when using Autoconf
91 -------------------------------------------------------------------
92 Checks for typedefs and structures
93    AC_CHECK_TYPE(ptrdiff_t,long)
94    AC_TYPE_SIZE_T
95    AC_CHECK_SIZEOF(short)
96    AC_CHECK_SIZEOF(int)
97    AC_CHECK_SIZEOF(long)
98    AC_CHECK_SIZEOF(long long)
99    AC_CHECK_SIZEOF(__int64)
100    AC_CHECK_SIZEOF(void *)
101    AC_CHECK_SIZEOF(size_t)
102    AC_CHECK_SIZEOF(ptrdiff_t)
103
104 Checks for compiler characteristics
105    AC_C_CONST
106
107 Checks for library functions
108    AC_CHECK_FUNCS(memcmp memcpy memmove memset)
109
110
111 Appendix D: Copyright
112 ---------------------
113 LZO and miniLZO are Copyright (C) 1996-2014 Markus Franz Xaver Oberhumer
114 All Rights Reserved.
115
116 LZO and miniLZO are distributed under the terms of the GNU General
117 Public License (GPL).  See the file COPYING.
118
119 Special licenses for commercial and other applications which
120 are not willing to accept the GNU General Public License
121 are available by contacting the author.
122
123
124