java - gzip a folder and its subfolders on the fly -


i have big folder want send zipped version of while saving on sub-folders hierarchy.

currently i'm doing creating large zip file , sending it.

i'm looking way write folder content outputstream redirected socket output stream.

my motivation avoid keeping large files in machine on run time

i know how single file, have no idea how process folder many sub folders , save inner hierarchy...

thanks!

it's little unclear you're after, since gzip has no notion of files - bytes compressed - need archive format tar combine bunch of files , directories single stream, , can gzip that.

if want compressed archive format, jdk's zipoutputstream let use zip compression.

if need gzip format, there number of implementstions of tar output streams out there - use 1 of , pipeline jdk's gzip output stream.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -