summaryrefslogtreecommitdiff
path: root/main/lzo/src/lzo1b_d.ch
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-29 18:18:50 +0200
commit68e19d426ba6d9f048ebfdf337b93a85dc4d5b4c (patch)
treecb33b2698e3f665546a328882c7481b11f633428 /main/lzo/src/lzo1b_d.ch
parentd3aa9f835d7fd5f53d3a0da6778d46a7067bf074 (diff)
Update lzo version
--HG-- extra : rebase_source : 4310223035376c8ac1773fd03a43289aa96ce4f3
Diffstat (limited to 'main/lzo/src/lzo1b_d.ch')
-rw-r--r--main/lzo/src/lzo1b_d.ch46
1 files changed, 16 insertions, 30 deletions
diff --git a/main/lzo/src/lzo1b_d.ch b/main/lzo/src/lzo1b_d.ch
index fe5f3611..cf253573 100644
--- a/main/lzo/src/lzo1b_d.ch
+++ b/main/lzo/src/lzo1b_d.ch
@@ -2,22 +2,7 @@
This file is part of the LZO real-time data compression library.
- Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
- 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
@@ -53,10 +38,10 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
lzo_bytep out, lzo_uintp out_len,
lzo_voidp wrkmem )
{
- register lzo_bytep op;
- register const lzo_bytep ip;
- register lzo_uint t;
- register const lzo_bytep m_pos;
+ lzo_bytep op;
+ const lzo_bytep ip;
+ lzo_uint t;
+ const lzo_bytep m_pos;
const lzo_bytep const ip_end = in + in_len;
#if defined(HAVE_ANY_OP)
@@ -68,7 +53,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
op = out;
ip = in;
- while (TEST_IP && TEST_OP)
+ while (TEST_IP_AND_TEST_OP)
{
t = *ip++; /* get marker */
@@ -96,10 +81,10 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
}
NEED_IP(t); NEED_OP(t);
-#if 1 && defined(LZO_UNALIGNED_OK_4)
+#if 1 && (LZO_OPT_UNALIGNED32)
do {
- UA_COPY32(op+0, ip+0);
- UA_COPY32(op+4, ip+4);
+ UA_COPY4(op+0, ip+0);
+ UA_COPY4(op+4, ip+4);
op += 8; ip += 8;
t -= 8;
} while (t > 0);
@@ -113,11 +98,11 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
NEED_IP(t); NEED_OP(t);
/* copy literal run */
-#if 1 && defined(LZO_UNALIGNED_OK_4)
+#if 1 && (LZO_OPT_UNALIGNED32)
if (t >= 4)
{
do {
- UA_COPY32(op, ip);
+ UA_COPY4(op, ip);
op += 4; ip += 4; t -= 4;
} while (t >= 4);
if (t > 0) do *op++ = *ip++; while (--t > 0);
@@ -136,7 +121,7 @@ literal2:
#endif
/* after a literal a match must follow */
- while (TEST_IP && TEST_OP)
+ while (TEST_IP_AND_TEST_OP)
{
t = *ip++; /* get R1 marker */
if (t >= R0MIN)
@@ -187,6 +172,7 @@ match:
{
t += 255;
ip++;
+ TEST_OV(t);
NEED_IP(1);
}
t += (M4_MIN_LEN - M3_MIN_LEN) + *ip++;
@@ -205,13 +191,13 @@ match:
/* copy match */
assert(m_pos >= out); assert(m_pos < op);
TEST_LB(m_pos); NEED_OP(t + M3_MIN_LEN - 1);
-#if defined(LZO_UNALIGNED_OK_4)
+#if (LZO_OPT_UNALIGNED32)
if (t >= 2 * 4 - (M3_MIN_LEN - 1) && (op - m_pos) >= 4)
{
- UA_COPY32(op, m_pos);
+ UA_COPY4(op, m_pos);
op += 4; m_pos += 4; t -= 4 - (M3_MIN_LEN - 1);
do {
- UA_COPY32(op, m_pos);
+ UA_COPY4(op, m_pos);
op += 4; m_pos += 4; t -= 4;
} while (t >= 4);
if (t > 0) do *op++ = *m_pos++; while (--t > 0);