in reply to Reading a .txt file under 2 levels of compression
But it would be cleaner, from a purist point of view, to skip using temp files and uncompress the ZIP file directly into RAM.
And by the looks of it, it seems IO::Uncompress::Unzip can do just that:
A top-level function, unzip, is provided to carry out "one-shot" uncompression between buffers and/or files. (emphasis mine)For OPTS, you'll need at least this — because a ZIP file can contain lots of files, and you have to select one:
- unzip $input => $output [, OPTS]
- unzip expects at least two parameters, $input and $output.
If $input is a scalar reference, the input data will be read from $$input.
If $output is a scalar reference, the uncompressed data will be stored in $$output.
- Name => "membername"
- Open "membername" from the zip file for reading.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading a .txt file under 2 levels of compression
by LazyIntern (Initiate) on Jan 12, 2011 at 00:25 UTC | |
by bart (Canon) on Jan 12, 2011 at 11:56 UTC | |
by pmqs (Friar) on Jan 12, 2011 at 13:44 UTC | |
by LazyIntern (Initiate) on Jan 13, 2011 at 01:04 UTC | |
by pmqs (Friar) on Jan 13, 2011 at 10:56 UTC | |
by bart (Canon) on Jan 13, 2011 at 12:17 UTC | |
by LazyIntern (Initiate) on Jan 14, 2011 at 00:45 UTC | |
by ww (Archbishop) on Jan 12, 2011 at 00:40 UTC | |
by LazyIntern (Initiate) on Jan 12, 2011 at 00:50 UTC |