Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to compress a big file into many zip files with Archive::Zip?

Reply
Thread Tools

How to compress a big file into many zip files with Archive::Zip?

 
 
Bo Yang
Guest
Posts: n/a
 
      11-19-2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I want to email a big file to in my application.
But the email system will only delivery attachment
with no more than 20M big. So I need compress the
big file into many little zip files, and email
separately.
And I have read the Archive::Zip document, and didn't
find any stuff about that.

Any suggestion will be greatly appreciated !
Thanks in advance!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYBKd7tZp58UCwyMRAu0DAJ9mBEwpJT7iNzrP5h489N GfZ/PpmgCeP7at
6Y0RBHcjJxMhHoM+UAv9G/g=
=6lGP
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
 
Sisyphus
Guest
Posts: n/a
 
      11-19-2006

"Bo Yang" <(E-Mail Removed)> wrote in message
news:ejp5u1$b68$(E-Mail Removed)99.com...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I want to email a big file to in my application.
> But the email system will only delivery attachment
> with no more than 20M big. So I need compress the
> big file into many little zip files, and email
> separately.


If it comes to the worst, you could arbitrarily split the large file into
(sufficiently) small files, zip them up, and send them off. Then, at the
other end, it's just a matter of unzipping the received files and
concatenating them (in the correct order).

Stay tuned, however, as there may be a smarter way of doing it.

I've actually got a personal interest in this - in that I want to upload a
5.6M file using my ISP's FTP server. But they don't seem to accept anything
bigger than 5M (although they allow me 10M storage). I've thought about
doing exactly as I've advised you, but the additional problem is that, at
their end, they don't give me access to any tool that will do the
concatenation (afaict) .... unless it can be done using "pretty home page"


Cheers,
Rob


 
Reply With Quote
 
 
 
 
anno4000@radom.zrz.tu-berlin.de
Guest
Posts: n/a
 
      11-19-2006
Bo Yang <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I want to email a big file to in my application.
> But the email system will only delivery attachment
> with no more than 20M big. So I need compress the
> big file into many little zip files, and email
> separately.


No. Email isn't a file transfer program. Use a file transfer
program to send your file in one piece.

> And I have read the Archive::Zip document, and didn't
> find any stuff about that.


That's because Archive::Zip is about compressing files, not
splitting them.

> Any suggestion will be greatly appreciated !


Use the right tool for the job.

Anno
 
Reply With Quote
 
Martijn Lievaart
Guest
Posts: n/a
 
      11-19-2006
On Sun, 19 Nov 2006 16:15:26 +0800, Bo Yang wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I want to email a big file to in my application.
> But the email system will only delivery attachment
> with no more than 20M big. So I need compress the
> big file into many little zip files, and email
> separately.
> And I have read the Archive::Zip document, and didn't
> find any stuff about that.


Correct, that module does not handle multi archive zipfiles. As an
alternative just split the file into smaller files, send those and
concatenate them on the receivers end.

Or send an URL where the other end can get the file using http or ftp.

M4
--
Redundancy is a great way to introduce more single points of failure.

 
Reply With Quote
 
Martijn Lievaart
Guest
Posts: n/a
 
      11-19-2006
On Sun, 19 Nov 2006 10:05:41 +0000, anno4000 wrote:

>> And I have read the Archive::Zip document, and didn't
>> find any stuff about that.

>
> That's because Archive::Zip is about compressing files, not
> splitting them.


However, zip has options for multivolume archives, Archive::Zip just
doesn't support it. So the expectation is not unreasonable.

M4
--
Redundancy is a great way to introduce more single points of failure.

 
Reply With Quote
 
anno4000@radom.zrz.tu-berlin.de
Guest
Posts: n/a
 
      11-19-2006
Martijn Lievaart <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> On Sun, 19 Nov 2006 10:05:41 +0000, anno4000 wrote:
>
> >> And I have read the Archive::Zip document, and didn't
> >> find any stuff about that.

> >
> > That's because Archive::Zip is about compressing files, not
> > splitting them.

>
> However, zip has options for multivolume archives, Archive::Zip just
> doesn't support it. So the expectation is not unreasonable.


Multivolume archives are meant to handle the case when a an archive
doesn't fit on a single volume (of tape, usually). It may be possible
to press the mechanism into service for splitting a single file into
smaller chunks, but that isn't what it's there for.

Unix (and presumably Cygwin) has the split command to do this.
Splitting is still not the right way to transfer a file that is
too big for mail.

Anno
 
Reply With Quote
 
Martijn Lievaart
Guest
Posts: n/a
 
      11-19-2006
On Sun, 19 Nov 2006 21:48:32 +0000, anno4000 wrote:

> Martijn Lievaart <(E-Mail Removed)> wrote in comp.lang.perl.misc:
>> On Sun, 19 Nov 2006 10:05:41 +0000, anno4000 wrote:
>>
>> >> And I have read the Archive::Zip document, and didn't
>> >> find any stuff about that.
>> >
>> > That's because Archive::Zip is about compressing files, not
>> > splitting them.

>>
>> However, zip has options for multivolume archives, Archive::Zip just
>> doesn't support it. So the expectation is not unreasonable.

>
> Multivolume archives are meant to handle the case when a an archive
> doesn't fit on a single volume (of tape, usually). It may be possible
> to press the mechanism into service for splitting a single file into
> smaller chunks, but that isn't what it's there for.


I know several other use cases where splitting makes sense.

> Unix (and presumably Cygwin) has the split command to do this.
> Splitting is still not the right way to transfer a file that is
> too big for mail.


Amen.

However, I worked in several environments where you had to make do with
what whas there. SMTP is not suited to transfer large files and as I
stated somewhere else in this thread, other mechanisms are better, easier
and may be triggered on an email. But if all you have is a hammer....

M4
--
Redundancy is a great way to introduce more single points of failure.

 
Reply With Quote
 
Bo Yang
Guest
Posts: n/a
 
      11-20-2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://www.velocityreviews.com/forums/(E-Mail Removed)-berlin.de :
> Bo Yang <(E-Mail Removed)> wrote in comp.lang.perl.misc:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I want to email a big file to in my application.
>> But the email system will only delivery attachment
>> with no more than 20M big. So I need compress the
>> big file into many little zip files, and email
>> separately.

>
> No. Email isn't a file transfer program. Use a file transfer
> program to send your file in one piece.

But we have no ftp server, so we must transfer it through
our mail server.
>
>> And I have read the Archive::Zip document, and didn't
>> find any stuff about that.

>
> That's because Archive::Zip is about compressing files, not
> splitting them.

I think zip can do multivolume compress. I have heard of that.
>
>> Any suggestion will be greatly appreciated !

>
> Use the right tool for the job.
>
> Anno


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYUEU7tZp58UCwyMRAumqAKDhHOjkofxXZm14dsiozj 9xt5PzXwCggeRA
Lrvg89CgzWSh3UPFljL+Y5Y=
=5Mlz
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Bo Yang
Guest
Posts: n/a
 
      11-20-2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martijn Lievaart :
> On Sun, 19 Nov 2006 10:05:41 +0000, anno4000 wrote:
>
>>> And I have read the Archive::Zip document, and didn't
>>> find any stuff about that.

>> That's because Archive::Zip is about compressing files, not
>> splitting them.

>
> However, zip has options for multivolume archives, Archive::Zip just
> doesn't support it. So the expectation is not unreasonable.

Why the module doesn't support such a practical function.
If I want to add this feature to this module, How could
I do ?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYUFa7tZp58UCwyMRApGvAKDVu8RZImvag2suU7U8aQ v9kxgZMQCeNilu
MDxpE5Ryl+8PF8uH2FgrSzY=
=PyY+
-----END PGP SIGNATURE-----
 
Reply With Quote
 
anno4000@radom.zrz.tu-berlin.de
Guest
Posts: n/a
 
      11-20-2006
Bo Yang <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> (E-Mail Removed)-berlin.de :
> > Bo Yang <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> I want to email a big file to in my application.
> >> But the email system will only delivery attachment
> >> with no more than 20M big. So I need compress the
> >> big file into many little zip files, and email
> >> separately.

> >
> > No. Email isn't a file transfer program. Use a file transfer
> > program to send your file in one piece.

> But we have no ftp server, so we must transfer it through
> our mail server.


Then get ftp (or rsync, or scp, or rcp, or ...). If you regularly
need to transfer big files you need a tool for that.

Anno
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Possibility to add a zip-file to a new zip-file with "add to zip" (right-click) ?? erikkie@casema.nl Computer Support 4 06-26-2006 12:18 AM
Amount of entries in zip file [Archive::Zip (Compress::Zlib)] Twig Perl Misc 1 01-27-2006 04:59 PM
NTFS compress VS folder compress in x64 jienmin Windows 64bit 1 09-02-2005 06:01 AM
Zipping many files -- each file into its own zip file with same name k* Computer Support 14 07-15-2003 12:26 PM



Advertisments