in reply to Re: Reading a zipped file
in thread Reading a zipped file

Ah ok.
I was under the impression i had to set the file size before it could be unzipped. With regards to the intermediate buffer size, does this affect anything a great deal?

Is it also possible to read the file without unzipping it? In the end i want to be able to get rid of the file so as to save space as soon as its in Excel format. Can this be done in perl?
Ta,

"Does the sighted man pity the blind man for loss of sight, or does the blind man pity the sighted man for lack of perception"

Replies are listed 'Best First'.
Re^3: Reading a zipped file
by polettix (Vicar) on Apr 04, 2005 at 15:48 UTC
    Is it also possible to read the file without unzipping it? In the end i want to be able to get rid of the file so as to save space as soon as its in Excel format. Can this be done in perl?

    Maybe you're a bit unclear talking about the file: what file do you refer to, the ZIP archive file (i.e. "file.zip" in the example) or the compressed file that's contained in the archive (i.e. "subdir/abc.txt" in the example)?

    If you're dealing with the former, I don't understand your question - you can delete the ZIP file once you'r done. Assuming the latter, AFAIK all unzipping using Archive::Zip happens in memory, and I guess it's the same for Archive::Zip::MemberRead, so you won't see anything cluttering your filesystem.

    Flavio (perl -e "print(scalar(reverse('ti.xittelop@oivalf')))")

    Don't fool yourself.
      Yeah sorry i was a bit unclear, I thought that the unzipping occurred as in the same way as for windows winzip - in that a file is produced that is the output. like test.zip when unzipped gives test.txt.

      The method i have i know will take a long time. If indeed it is stored in memory that will surely cane any memory if the file is large and so decrease the programs running speed. Again if this is unzipped in memory how then is it possible to write a spreadsheet file from this memory data.
      Am i way off here and being really stupid.

        Am i way off here and being really stupid.
        Don't tell this, I understand it's difficult to move the first steps in a totally unknown world full of many ways to do stuff.

        Back to business, I think that a simple search for Excel in CPAN will be useful for you. I haven't used any of them, but I think that you'll be able to understand how to solve your problem.

        Flavio (perl -e "print(scalar(reverse('ti.xittelop@oivalf')))")

        Don't fool yourself.