archive-tar

Why does the tarball directory structure disappear when I use Perl's Archive::Tar?

I'm using a Perl script to modify some files inside a .tar, and the directory structure inside the resulting .tar disappears. Eliminating more and more code I've come as far as all that's required to reproduce this is my $data_tar = Archive::Tar->new('data.tar'); $data_tar->write('modified_data.tar'); Both .tar-files have all the file...

Why does Perl's Archive::Tar run out of memory?

I am using below Perl code to list the files in tar archive. The size of the tar archive is always about 15MB. my $file = shift; my $tar = Archive::Tar->new("$file"); my @lists = $tar->list_files; $tar->error unless @lists; Executing this code gives me an error "Out of Memory". I have about 512MB in my Linux system and I dont want to...

"Untar" file on iPhone

Hi All, I'm writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app's Documents folder. I'm using tar/gzip because I want to download a whole bunch of small files in one HTTP request, to make everything nice and fast. I've investigated solutions...

Why is Perl's IO:Compress::Adapter::Deflate running out of memory?

I'm trying to set the file permissions of files contained in a tarball with the following: print "Checking $tgz_file... "; my $edited = 0; my $tarball = Archive::Tar->new($tgz_file); my @items = $tarball->get_files(); foreach (@items) { if ($_->is_dir && $_->mode != 0755) { $_->mode(0755); $edited = 1; } elsif ($...

On the fly zip or tar creation?

I may NOT bother with this but if its very simple i may consider it. The site i am working on by design is to hold hundreds of thousands of files. I dont know if we'll have only one download or multiple. Right now the choices are A) Just the file B) An archive that has the file + license and conditions. I am trying to figure out it can ...