tsabirgaliev / zip

Lazy Streamed Zip Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Motivation

The Java JDK includes various means of creating/consuming compressed files. What is missing is easy way of creating lazy streamed zip archive, in spirit of java.util.zip.DeflaterInputStream.

This implementation relies on the fact that the PKZIP specification allows archiving data streams of sizes not known upfront. This implies that the archives produced will be readable only by tools aware of this trick. Notably, java.util.zip.ZipInputStream is OK with that, so we use it to test compatibility.

Using

ZipperInputStream lzis = new ZipperInputStream(...);

See more detailed example in io.github.tsabirgaliev.ZipperInputStreamTest

TODO

  • ✓ Put the correct file modification time and date

  • ❏ Support ZIP64 format extensions for really BIG files

  • ❏ Check duplicate file names?

Pull requests are welcome!

About

Lazy Streamed Zip Implementation

License:Other


Languages

Language:Java 100.0%