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.
In reply to Re: Reading a .txt file under 2 levels of compression
by bart
in thread Reading a .txt file under 2 levels of compression
by LazyIntern
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |