3
0

lzo1x_1o.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* LZO1X-1(15) compression
  2. This file is part of the LZO real-time data compression library.
  3. Copyright (C) 1996..2008 Markus Franz Xaver Johannes Oberhumer
  4. All Rights Reserved.
  5. Markus F.X.J. Oberhumer <markus@oberhumer.com>
  6. http://www.oberhumer.com/opensource/lzo/
  7. The LZO library is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License as
  9. published by the Free Software Foundation; either version 2 of
  10. the License, or (at your option) any later version.
  11. The LZO library is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with the LZO library; see the file COPYING.
  17. If not, write to the Free Software Foundation, Inc.,
  18. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. #include "libbb.h"
  21. #include "liblzo.h"
  22. #define D_BITS 15
  23. #define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5)
  24. #define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f)
  25. #define DO_COMPRESS lzo1x_1_15_compress
  26. #include "lzo1x_c.c"