Search code examples
javaapache-commons-vfs

Opening xz files with Apache Commons VFS


Is there a way to open XZ compressed files with Apache Commons VFS? It is not currently listed under the supported filesystems but I would imagine someone has tackled writing the necessary code already.


Solution

  • So turns out it was simple enough to do. I ended up creating an open source project that adapted the internal Apache Commons VFS support for gzip and bzip2 and did the same for xz: https://github.com/asieira/vfs2-xz

    All you need to do is include the JAR file in the CLASSPATH and URIs starting with xz: now work.