README.LZO 3.9 KB

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