diff options
Diffstat (limited to 'src/lzo1f_9x.c')
-rw-r--r-- | src/lzo1f_9x.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/lzo1f_9x.c b/src/lzo1f_9x.c index 4240a77..eb78d8c 100644 --- a/src/lzo1f_9x.c +++ b/src/lzo1f_9x.c @@ -2,19 +2,7 @@ This file is part of the LZO real-time data compression library. - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or @@ -45,12 +33,12 @@ // ************************************************************************/ -#define N 16383 /* size of ring buffer */ -#define THRESHOLD 2 /* lower limit for match length */ -#define F 2048 /* upper limit for match length */ +#define SWD_N 16383 /* size of ring buffer */ +#define SWD_THRESHOLD 2 /* lower limit for match length */ +#define SWD_F 2048 /* upper limit for match length */ -#define LZO1F +#define LZO1F 1 #define LZO_COMPRESS_T lzo1f_999_t #define lzo_swd_t lzo1f_999_swd_t #include "lzo_mchw.ch" @@ -109,7 +97,7 @@ static lzo_bytep STORE_RUN ( lzo_bytep op, const lzo_bytep ii, lzo_uint t, lzo_bytep out ) { if (t < 4 && op > out) - op[-2] |= LZO_BYTE(t); + op[-2] = LZO_BYTE(op[-2] | t); else if (t <= 31) *op++ = LZO_BYTE(t); else @@ -221,7 +209,7 @@ lzo1f_999_compress_callback ( const lzo_bytep in , lzo_uint in_len, if (m_len > 0 && lazy_match_min_gain >= 0 && c->look > m_len) { r = find_match(c,swd,1,0); - assert(r == 0); + assert(r == 0); LZO_UNUSED(r); assert(c->look > 0); if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET && @@ -272,7 +260,7 @@ lzo1f_999_compress_callback ( const lzo_bytep in , lzo_uint in_len, /* a literal */ lit++; r = find_match(c,swd,1,0); - assert(r == 0); + assert(r == 0); LZO_UNUSED(r); } else { @@ -290,7 +278,7 @@ lzo1f_999_compress_callback ( const lzo_bytep in , lzo_uint in_len, /* 2 - code match */ op = code_match(c,op,m_len,m_off); r = find_match(c,swd,m_len,1+ahead); - assert(r == 0); + assert(r == 0); LZO_UNUSED(r); } c->codesize = pd(op, out); |