in reply to Re^4: Read multiple text file from bz2 without extract first
in thread Read multiple text file from bz2 without extract first
Why don't you compare the times yourself? The time depends on what is faster, decompressing and reading (CPU), or decompressing+writing+reading (IO). It also depends on whether you need to process the file more than once.
From Perl, you can directly decompress and read by using the pipe-open:
open my $fh, "bzip -cd $file |" or die "Couldn't open '$file': $!";
That is efficient if you only need to read the data once. If you need to read it more than once and have the disk space needed, decompressing once and then reading the decompressed file is likely faster.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Read multiple text file from bz2 without extract first
by prescott2006 (Acolyte) on Apr 03, 2012 at 03:23 UTC | |
by Corion (Patriarch) on Apr 03, 2012 at 05:28 UTC |