mirror of
https://github.com/lz4/lz4.git
synced 2024-11-28 20:33:34 +08:00
Small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@16 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
This commit is contained in:
parent
84bfd32c9c
commit
32f4bab6fc
6
lz4.c
6
lz4.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user