Skip to content

noamt/smarchive

Repository files navigation

Smarchive - The Smart Archive

Backed by commons-compress, the Smart Archive detects and morphs into a specific archive stream

Build Status

download

Abstract

At times you might have to handle an archive input stream but you will have no prior knowledge of the archiving method.

Based on the magic headers, the Smart Archive will auto-detect the archiving method and apply it accordingly.

Currently the support types are tar, ar and zip. The Smart Archive will also apply a GZip filter if needed.

Installation

If you haven’t already done so, add JCenter to your repositories:

repositories {
    jcenter()
}

Then add the dependency to compile time:

dependencies {
    compile 'org.10ne:smarchive:0.1'
}

Usage

Usage is simple. To create a Smart Archive instance:

import org._10ne.smarchive.SmarchiveInputStream

...

public void readArchiveEntries(InputStream inputStream) {
    ArchiveInputStream archiveStream = SmarchiveInputStream.realize(inputStream);
    ...
}

About

The Smart Archive Input Stream

Resources

License

Stars

Watchers

Forks

Packages

No packages published