in reply to Re^2: IO::Uncompress::Gunzip thread safe?
in thread IO::Uncompress::Gunzip thread safe?
If you can make use of multiple CPUs, it might be easier to handle the decompression through an external process, at the cost of more inter-proces IO:
open my $fh, "gzip -cd $file |" or die "Couldn't read from '$file': $! / $?"; binmode $fh; while (<$fh>) { # or whatever loop mechanism is appropriate ... }
That way you lose some finer grained control over the error states - for zero-byte files, gzip might just exit and not output anything and your program might think everything is OK, for example.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: IO::Uncompress::Gunzip thread safe?
by chris212 (Scribe) on Nov 21, 2016 at 21:55 UTC | |
by BrowserUk (Patriarch) on Nov 21, 2016 at 23:27 UTC | |
by chris212 (Scribe) on Nov 22, 2016 at 15:11 UTC | |
by BrowserUk (Patriarch) on Nov 22, 2016 at 15:42 UTC | |
by soonix (Chancellor) on Nov 22, 2016 at 19:04 UTC | |
by afoken (Chancellor) on Nov 22, 2016 at 21:30 UTC | |
by pryrt (Abbot) on Nov 22, 2016 at 22:55 UTC | |
by Corion (Patriarch) on Nov 22, 2016 at 08:12 UTC |