An open API service indexing awesome lists of open source software.

https://github.com/azazar/vfs

Simple VFS for scanning through rar/zip/tar/gz compressed and/or packed files
https://github.com/azazar/vfs

gzip java rar tar vfs zip

Last synced: 5 months ago
JSON representation

Simple VFS for scanning through rar/zip/tar/gz compressed and/or packed files

Awesome Lists containing this project

README

          

# VFS

VFS that allows accessing remote or enclosed files without need for replicating
containers. It's original purpose was to allow recursive scanning of archives.
But now it's a bit more than that.

## Supported containers and compressors

Format|Extensions|Supported by
-|-|-
Zip|.zip|Both
Tar|.tar/.tgz|VFS
Rar|.rar|Scanner
GZip|.gz|VFS
BZip2|.bz2|VFS
ZStd|.zst|VFS

## Example

```java
public class Example {

public static void readFromArchive() throws IOException {
// reading file named "enclosed.txt" from zip archive "archive.zip"
try (InputStream i = new VfsFile(new File("archive.zip"), "enclosed.txt").open()) {
System.out.println(IOUtils.toString(i, StandardCharsets.UTF_8));
}
}

public static void scan() throws IOException {
// print content of all files in zip archive "archive"
try(VfsScanner s = new VfsScanner(file -> {
try {
System.out.println(file.getContentAsUTF8String());
}
catch (IOException ex) {
ex.printStackTrace();
}
})) {
s.scan(new File("archive.zip"));
}
}
}

}
```

## Maven

### Repository

```xml


jitpack.io
https://jitpack.io

```

### Artifact

```xml

com.github.azazar
vfs
1.1.13

```