Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- tested successfully z-presentation of yacy seed encoding - added alternative switch that takes shortest representation as yacy seed string encoding
orbiter36b898ca7adc
diff --git a/source/de/anomic/tools/crypt.java b/source/de/anomic/tools/crypt.javaindex 4ae4be66b..2c201583c 100644--- a/source/de/anomic/tools/crypt.java+++ b/source/de/anomic/tools/crypt.java@@ -129,4 +129,10 @@ public class crypt {}}+ public static void main(String[] args) {+ String teststring="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";+ System.out.println("Teststring = " + teststring);+ System.out.println("enc-b result = " + simpleDecode(simpleEncode(teststring, null, 'b'), null));+ System.out.println("enc-z result = " + simpleDecode(simpleEncode(teststring, null, 'z'), null));+ }}\ No newline at end of filediff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.javaindex 99c23051b..b34731bdc 100644--- a/source/de/anomic/yacy/yacySeed.java+++ b/source/de/anomic/yacy/yacySeed.java@@ -818,7 +818,11 @@ public class yacySeed {public final String genSeedStr(String key) {// use a default encoding- return this.genSeedStr('z', key);+ String z = this.genSeedStr('z', key);+ String b = this.genSeedStr('b', key);+ // the compressed string may be longer that the uncompressed if there is too much overhead for compression meta-info+ // take simply that string that is shorter+ if (b.length() < z.length()) return b; else return z;}public final synchronized String genSeedStr(char method, String key) {