]> gitweb.fperrin.net Git - DictionaryPC.git/blobdiff - src/com/hughes/android/dictionary/engine/WiktionarySplitter.java
Add read-ahead buffer to decompress in parallel.
[DictionaryPC.git] / src / com / hughes / android / dictionary / engine / WiktionarySplitter.java
index 290a58fccc1e38a6c36acdd44f2cb08cf42abb40..850dedee2018c7fcf2ea4bb558edefdfb27551a7 100644 (file)
@@ -96,6 +96,7 @@ public class WiktionarySplitter extends org.xml.sax.helpers.DefaultHandler {
                 } else {
                     InputStream compressedIn = new BufferedInputStream(new FileInputStream(input));
                     InputStream in = new CompressorStreamFactory().createCompressorInputStream(compressedIn);
+                    in = new ReadAheadBuffer(in, 20 * 1024 * 1024);
                     parser.parse(new BufferedInputStream(in), this);
                 }
             } catch (Exception e) {