nejckorasa / s3-stream-unzip

Lightweight Java library to manage unzipping of large files and data in AWS S3 without knowing the size beforehand and without keeping it all in memory or writing to disk.
https://nejckorasa.github.io/posts/s3-unzip/
MIT License
38 stars 8 forks source link

pipe to unzip to s3? #15

Open swamidass opened 10 months ago

swamidass commented 10 months ago

What if you have this zip locally (or at least a stream for it) and want to unzip it into an s3 bucket? How would we do this?

nejckorasa commented 9 months ago

Hi, this is not directly supported unfortunately as the tool specifically handles unzipping files in S3. That said, it would be possible to extend it by supporting unzipping local files. Contributions are very welcome!

UnzipStrategy (e.g. NoSplitUnzipStrategy.java) is performing the unzip - translating input stream from S3 zip file and uploading it unzipped back to S3, here.

You can take the same approach for local zip files, following the implementation of S3UnzipManager.