Menu
  • HOME
  • TAGS

Optimizing Ungunzipping process in Java?

java,performance,optimization,uncompress,gunzip

You created your BufferedInputStream from the GZIPInputStream, for performance you would do that in the reverse order. Also, I suggest you shrink your buffer size (and use your buffered streams). Finally, I would use a try-with-resources Statement and that might look something like public static boolean ungunzip(String compressedFile, String decompressedFile)...

Extract file using bash script

bash,loops,tar,gunzip

If your problem is that the tar.gz file contains another tar.gz file which should be extracted as well, you need a different sort of loop. The wildcard at the top of the for loop is only evaluated when the loop starts, so it doesn't include anything extracted from the tar.gz...

FIFO file in TCL

tcl,hang,fifo,mkfifo,gunzip

I solved this issue in this way : proc unzip_file_if_needed { fileName } { if { [file extension $fileName] != ".gz" } { return $fileName; } set tmpDir [fileutil::tempdir] set pId [pid] set tmpFileName [ file join $tmpDir pId ] set unzipCmd [ file join $tmpDir [ append pId "cmd.sh"...

How to import latest database backup file to backup server

mysql,linux,ls,gunzip

Try using xargs: ls -Art *.sql.gz |tail -n 1 |xargs gunzip -c | mysql --user=user --password=password database ...

node.js how to stream 22GB gzipped file uncompress on the fly

node.js,stream,gunzip

Here is the reverse operation using zlib.createGunzip instead of zlib.createGzip: var r = fs.createReadStream('file.txt.gz'); var z = zlib.createGunzip(); var w = fs.createWriteStream('file.txt'); r.pipe(z).pipe(w); ...