For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2006 > create zip file of size 0 ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author create zip file of size 0 ?
maby_n@spray.se

2006-01-19, 3:57 am

Hi. Is it possible to create an empty zip file of size 0 ?

I use the Archive:: Zip as follows:

use Archive::Zip;
my $zip = Archive::Zip->new();
$zip->writeToFileNamed('xxx.zip');

But this creates a file of size is 1 KB. The script is run on a PC if
that makes any difference. Is there a way to get the size down to 0?

Thankful for help

usenet@DavidFilmer.com

2006-01-19, 3:57 am

mab...@spray.se wrote:
> Hi. Is it possible to create an empty zip file of size 0 ?


No. The zip format imposes overhead. Usually, this is offset by
compression efficiency, but not for trivial (zero-byte) files.

Of course, you can 'touch' an empty file named something.zip, but it's
not really a zip file.

usenet@DavidFilmer.com

2006-01-19, 7:56 am

maby_n@spray.se wrote:
> a question


Your question was multi-posted to other newsgroups. That's rude. It's
(generally) impolite to cross-post, but it's downright rude to
multi-post.

abhi

2006-01-20, 6:59 pm

hi there
it's not just zip files but any file storage requires data to maintain
integrity
ciao

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com