Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/noamt/smarchive

The Smart Archive Input Stream
https://github.com/noamt/smarchive

Last synced: 16 days ago
JSON representation

The Smart Archive Input Stream

Awesome Lists containing this project

README

        

= Smarchive - The Smart Archive =

== Backed by link:https://commons.apache.org/proper/commons-compress/[commons-compress], the Smart Archive detects and morphs into a specific archive stream ==

image:https://travis-ci.org/noamt/smarchive.svg?branch=master["Build Status", link="https://travis-ci.org/noamt/smarchive"]

image:https://api.bintray.com/packages/noamt/java-libraries/smarchive/images/download.svg[link="https://bintray.com/noamt/java-libraries/smarchive/_latestVersion"]

=== 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:
[source,groovy]
----
repositories {
jcenter()
}
----

Then add the dependency to compile time:
[source,groovy]
----
dependencies {
compile 'org.10ne:smarchive:0.1'
}
----

=== Usage ===

Usage is simple. To create a Smart Archive instance:
[source,java]
----
import org._10ne.smarchive.SmarchiveInputStream

...

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