Small compression speed improvement

git-svn-id: https://lz4.googlecode.com/svn/trunk@16 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
This commit is contained in:
yann.collet.73@gmail.com 2011-09-13 12:01:11 +00:00
parent 84bfd32c9c
commit 32f4bab6fc

6
lz4.c
View File

@ -122,13 +122,13 @@ int LZ4_compressCtx(void** ctx,
struct refTables *srt = (struct refTables *) (*ctx);
BYTE** HashTable;
BYTE *ip = (BYTE*) source, /* input pointer */
BYTE *ip = (BYTE*) source,
*anchor = ip,
*incompressible = anchor + INCOMPRESSIBLE,
*iend = ip + isize,
*ilimit = iend - MINMATCH;
BYTE *op = (BYTE*) dest, /* output pointer */
BYTE *op = (BYTE*) dest,
*ref,
*orun, *l_end;
@ -171,7 +171,7 @@ int LZ4_compressCtx(void** ctx,
// Copy Literals
l_end = op + length;
while (op<l_end) { *(U32*)op = *(U32*)anchor; op+=4; anchor+=4; }
do { *(U32*)op = *(U32*)anchor; op+=4; anchor+=4; } while (op<l_end) ;
op = l_end;
// Encode Offset