[Scummvm-cvs-logs] SF.net SVN: scummvm:[41610] tools/trunk/compress_gob.cpp
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Wed Jun 17 17:07:56 CEST 2009
Revision: 41610
http://scummvm.svn.sourceforge.net/scummvm/?rev=41610&view=rev
Author: strangerke
Date: 2009-06-17 15:07:55 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
oups : missing spaces, trailing spaces
Modified Paths:
--------------
tools/trunk/compress_gob.cpp
Modified: tools/trunk/compress_gob.cpp
===================================================================
--- tools/trunk/compress_gob.cpp 2009-06-17 15:01:34 UTC (rev 41609)
+++ tools/trunk/compress_gob.cpp 2009-06-17 15:07:55 UTC (rev 41610)
@@ -157,7 +157,7 @@
realSize = fileSize(src);
if (curChunk->packed) {
- printf("Compressing %12s\t", curChunk->name);
+ printf("Compressing %12s\t", curChunk->name);
curChunk->size = writeBodyPackFile(stk, src);
printf("%d -> %d bytes\n", realSize, curChunk->size);
} else {
@@ -242,7 +242,6 @@
return;
}
-// Some LZ77-variant
uint32 writeBodyPackFile(FILE *stk, FILE *src) {
byte dico[4114];
byte writeBuffer[17];
@@ -345,14 +344,15 @@
for (tmpPos = 0; tmpPos < 0x1000; tmpPos++) {
tmpLength = 0;
for (i = 0; ((i < 18) & (i < counter)); i++)
- if ((unpacked[unpackedIndex + i] == dico[(tmpPos + i) % 4096]) & (((tmpPos + i) % 4096 != currIndex) | (i==0)))
+ if ((unpacked[unpackedIndex + i] == dico[(tmpPos + i) % 4096]) & (((tmpPos + i) % 4096 != currIndex) | (i == 0)))
tmpLength++;
else
+ // avoid dictionary collision
break;
if (tmpLength > bestLength)
{
bestPos = tmpPos;
- if ((bestLength= tmpLength) == 18)
+ if ((bestLength = tmpLength) == 18)
break;
}
}
@@ -360,11 +360,9 @@
pos = bestPos;
length = bestLength;
- if (bestLength > 2) {
+ if (bestLength > 2)
return true;
- }
- else
- {
+ else {
length = 0;
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list