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
- Host: GitHub
- URL: https://github.com/azazar/vfs
- Owner: azazar
- Created: 2018-12-07T10:28:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-12-17T10:20:16.000Z (6 months ago)
- Last Synced: 2025-12-20T11:20:52.315Z (6 months ago)
- Topics: gzip, java, rar, tar, vfs, zip
- Language: Java
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```