in reply to Modify zip file in memory

Using Archive::Tar on tar data already in memory might have some additional clues for you. IO::Scalar looks like the way to go.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Modify zip file in memory
by rv799cv (Initiate) on May 17, 2014 at 15:50 UTC

    thanks so much for the reply! would any of you have an small example that can lead me?

      I don't have Windows, but after googling a bit, it looks like IO::Uncompress::Unzip and IO::Compress::Zip does what you want from a high level interface. That will save you the trouble of dealing with IO::Scalar manually unzipping and tracking position. There are examples in the docs.

      Also see using IO::String instead of IO::Scalar for in memory zip files.

      With IO::Scalar, the basic example is:

      use IO::Scalar; my $memory_file = ''; #scalar as a file , my $memfile_fh = IO::Scalar->new(\$memory_file); #filehandle to the sc +alar # write to the scalar $memory_file my $status = $zip->writeToFileHandle($memfile_fh); $memfile_fh->close;
      Googling around I found this for Windows. Chilcat zip utility which claims to do in memory access in Windows.

      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh