beginner1010 has asked for the wisdom of the Perl Monks concerning the following question:

Hello everybody,

i got a problem with the "ARCHIVE::Extract" function with .tar archives. It looks like it is only able to handle a specific file size in relation to the system's RAM. Currently we only have 2GB within the Virtual Server which means, that every .tar file above about 1.2GB will freeze the script.

Simply upgrading the systems memory is unfortunatelly not an option. The System does not have direct internet access so installing any further packages/extensions is a real pain in the back which i would like to avoid if possible.

I already tried Archive::tar which has the same restrictions. I assume, both function place the archive within the RAM to be able to manipulate it before the actual extraction.
$Archive::Extract::PREFER_BIN is set to true which does no good because the script is running on a Windows System. Also i found the Archive::Extract::Libarchive which needs the libarchive installed - i did not look further into this yet because it needs further programms to compile it first on the system.

Ideas:
Is there a way to install a command line tool on Windows so the "$Archive::Extract::PREFER_BIN" will work? Are there any other alternatives to the function? We do not need anything else besides unpacking the files to a specific folder.

Any help is highly appreciated!

###########################################
Tried to reply on your comments but i only get a "Permission Denied" Page :(

Anyway - Thank you for your quick reply!
I looked into the ARCHIVE::Tar::Wrapper and so far it looks very promising - how can i install tar on a Windows System? Or can i use any other archiver (WinRar/7zip..), too?

I totally agree - usually it is just a few clicks to add more memory to a VM but we have quite strict prozesses here. Adding more memory has to be requested through the proper channels and can take up to several months..

Replies are listed 'Best First'.
Re: Archive::Extract alternatives?
by hippo (Archbishop) on Nov 18, 2014 at 15:57 UTC

    The docs for Archive::Tar::Wrapper state that the module "never stores anything in memory, but works on temporary directory structures on disk instead" so perhaps that is what you need.

    You also said:

    Currently we only have 2GB within the Virtual Server ... Simply upgrading the systems memory is unfortunatelly not an option.

    which is rather odd. Ordinarily the use of a VM means that upgrading the system's memory is a doddle. Perhaps you have been misinformed?

      Perhaps it's not an option for reasons other than the technical.