Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.tukaani.xz.LZMA2Options;
import org.tukaani.xz.XZOutputStream;

import picocli.CommandLine.ArgGroup;
import picocli.CommandLine.Command;
Expand Down Expand Up @@ -833,6 +835,10 @@ private OutputStream getOutputStream(String filename, CompressionFormat comp)
out = new GZIPOutputStream(out);
break;

case XZ:
out = new XZOutputStream(out, new LZMA2Options());
break;

case NONE:
break;
}
Expand Down
5 changes: 5 additions & 0 deletions ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
<artifactId>owlapi-distribution</artifactId>
<version>4.5.29</version>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>1.12</version>
</dependency>
<dependency>
<groupId>io.github.liveontologies</groupId>
<artifactId>elk-owlapi</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ public enum CompressionFormat {
*
* @see <a href="https://www.rfc-editor.org/info/rfc1952/">RFC 1952</a>
*/
GZIP(".gz");
GZIP(".gz"),

/**
* The XZ file format from the XZ Utils project.
*
* @see <a href="https://tukaani.org/xz/xz-file-format.txt">XZ file format</a>
*/
XZ(".xz");

private String extension;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.incenp.obofoundry.sssom.TSVReader;
import org.incenp.obofoundry.sssom.TSVReader.SeparatorMode;
import org.incenp.obofoundry.sssom.rdf.RDFReader;
import org.tukaani.xz.XZInputStream;

/**
* A class providing helper methods to obtain SSSOM reader objects.
Expand Down Expand Up @@ -513,6 +514,10 @@ private InputStream getInputStream(String filename, boolean allowStdin, Compress
in = new GZIPInputStream(in);
break;

case XZ:
in = new XZInputStream(in);
break;

case NONE:
break;
}
Expand Down
Loading