r26934 - trunk/freenet/src/freenet/client/async
[email protected] Fri, 17 Apr 2009 11:48:23 +0000
| Newsgroups | gmane.network.freenet.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: j16sdiz
Date: 2009-04-17 11:48:22 +0000 (Fri, 17 Apr 2009)
New Revision: 26934
Modified:
trunk/freenet/src/freenet/client/async/InsertCompressor.java
Log:
Actually, we don't need this check
Modified: trunk/freenet/src/freenet/client/async/InsertCompressor.java
===================================================================
--- trunk/freenet/src/freenet/client/async/InsertCompressor.java 2009-04-17 11:45:10 UTC (rev 26933)
+++ trunk/freenet/src/freenet/client/async/InsertCompressor.java 2009-04-17 11:48:22 UTC (rev 26934)
@@ -133,6 +133,7 @@
result = comp.compress(origData, bucketFactory2, origSize, bestCompressedDataSize);
long resultSize = result.size();
+ // minSize is {SSKBlock,CHKBlock}.MAX_COMPRESSED_DATA_LENGTH
if(resultSize < minSize) {
if(logMINOR)
Logger.minor(this, "New size "+resultSize+" smaller then minSize "+minSize);
@@ -146,10 +147,7 @@
shouldFreeOnFinally = false;
break;
}
- if(resultSize < bestCompressedDataSize &&
- // If compressing to CHK, origSize will always be greater
- // If compressing to SSK, we are not interested unless we can get it small enough to fit in the SSK itself
- (origSize > CHKBlock.DATA_LENGTH || resultSize <= SSKBlock.DATA_LENGTH)) {
+ if(resultSize < bestCompressedDataSize) {
if(logMINOR)
Logger.minor(this, "New size "+resultSize+" better than old best "+bestCompressedDataSize);
if(bestCompressedData != null && bestCompressedData != origData)