Skip to content

Commit

Permalink
Autodetect dump file compression format from filename (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-matson committed Dec 16, 2020
1 parent 8400cdd commit d09362e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -37,6 +37,7 @@
import org.wikidata.wdtk.util.CompressionType;
import org.wikidata.wdtk.util.DirectoryManager;
import org.wikidata.wdtk.util.DirectoryManagerFactory;
import org.wikidata.wdtk.dumpfiles.wmf.WmfDumpFile;

/**
* Class for representing dump files that are found at arbitrary (local) file
Expand Down Expand Up @@ -199,7 +200,7 @@ public InputStream getDumpFileStream() throws IOException {
+ "\" is not available for reading.");
}
return this.directoryManager.getInputStreamForFile(this.dumpFileName,
MwLocalDumpFile.COMPRESSION_TYPE.get(this.dumpContentType));
WmfDumpFile.getDumpFileCompressionType(dumpFileName));
}

@Override
Expand Down

0 comments on commit d09362e

Please sign in to comment.