Notes on using alternative compression (JENA-2181)
Show how Jena can be used with alternative compression formats beyond
those it supports natively
diff --git a/source/documentation/io/__index.md b/source/documentation/io/__index.md
index 59a76da..1253e03 100644
--- a/source/documentation/io/__index.md
+++ b/source/documentation/io/__index.md
@@ -72,6 +72,13 @@
compressed. The file name is examined for an inner extension. For
example, `.nt.gz` is gzip compressed N-Triples.
+Jena does not support all possible compression formats itself, only
+GZip, BZip2 and Snappy are supported directly. If you want to use an
+alternative compression format you can do so by piping the output of the
+relevant decompression utility into one of Jena's commands e.g.
+
+ zstd -d < FILE.nq.zst | riot --syntax NQ ...
+
These scripts call java programs in the `riotcmd` package. For example:
java -cp ... riotcmd.riot file.ttl
diff --git a/source/documentation/io/streaming-io.md b/source/documentation/io/streaming-io.md
index 73842a3..986fd7f 100644
--- a/source/documentation/io/streaming-io.md
+++ b/source/documentation/io/streaming-io.md
@@ -15,6 +15,15 @@
to such files takes this into account, including looking for the other file
extension. `data.nt.gz` is parsed as a gzip-compressed N-Triples file.
+Jena does not support all possible compression formats itself, only
+GZip, BZip2 and Snappy are supported directly. If you want to use an
+alternative compression format you can do so by adding suitable dependencies
+yourself into your project and passing a suitable `InputStream`/`OutputStream`
+implementation to Jena code e.g.
+
+ InputStream input = new ZstdCompressorInputStream(....);
+ RDFParser.source(input).lang(Lang.NQ).parse(graph);
+
## StreamRDF
The central abstraction is