Package org.toubassi.femtozip.models

Examples of org.toubassi.femtozip.models.FemtoZipCompressionModel.build()


   
    @Test
    public void testDictionaryOptimizer() throws IOException {
       
        CompressionModel compressionModel = new FemtoZipCompressionModel();
        compressionModel.build(new ArrayDocumentList(PreambleString.getBytes()));
       
        String dictionary = dictionaryToString(compressionModel.getDictionary());
        Assert.assertEquals(" our to , ince, sticure and , proity, s of e the for the establish the United States", dictionary);

        compressionModel = new FemtoZipCompressionModel();
View Full Code Here


       
        String dictionary = dictionaryToString(compressionModel.getDictionary());
        Assert.assertEquals(" our to , ince, sticure and , proity, s of e the for the establish the United States", dictionary);

        compressionModel = new FemtoZipCompressionModel();
        compressionModel.build(new ArrayDocumentList(PanamaString.getBytes()));
       
        dictionary = dictionaryToString(compressionModel.getDictionary());
        Assert.assertEquals("an a ", dictionary);
    }
   
View Full Code Here

        documents.add((new String("garrick1garrick2garrick3garrick4garrick")).getBytes("UTF-8"));
        documents.add((new String("xtoubassigarrick")).getBytes("UTF-8"));
        documents.add((new String("ytoubassi")).getBytes("UTF-8"));
        documents.add((new String("ztoubassi")).getBytes("UTF-8"));
       
        model.build(new ArrayDocumentList(documents));
       
        String dictionary = dictionaryToString(model.getDictionary());
        Assert.assertEquals("garricktoubassi", dictionary);
    }
View Full Code Here

        documents.add((new String("http://google.de")).getBytes("UTF-8"));
        documents.add((new String("http://yahoo.de")).getBytes("UTF-8"));
        documents.add((new String("gtoubassi")).getBytes("UTF-8"));
        documents.add((new String("gtoubassi")).getBytes("UTF-8"));
       
        model.build(new ArrayDocumentList(documents));
       
        String dictionary = dictionaryToString(model.getDictionary());
        // Make sure it doesn't think .dehttp:// is a good one
        Assert.assertEquals("gtoubassihttp://", dictionary);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.