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

B

Bo Yang

-----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

iD8DBQFFYBKd7tZp58UCwyMRAu0DAJ9mBEwpJT7iNzrP5h489NGfZ/PpmgCeP7at
6Y0RBHcjJxMhHoM+UAv9G/g=
=6lGP
-----END PGP SIGNATURE-----
 
S

Sisyphus

Bo Yang said:
-----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
 
A

anno4000

Bo Yang said:
-----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
 
M

Martijn Lievaart

-----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
 
M

Martijn Lievaart

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
 
A

anno4000

Martijn Lievaart said:
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
 
M

Martijn Lievaart

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
 
B

Bo Yang

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed)-berlin.de :
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.
That's because Archive::Zip is about compressing files, not
splitting them.
I think zip can do multivolume compress. I have heard of that.
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

iD8DBQFFYUEU7tZp58UCwyMRAumqAKDhHOjkofxXZm14dsiozj9xt5PzXwCggeRA
Lrvg89CgzWSh3UPFljL+Y5Y=
=5Mlz
-----END PGP SIGNATURE-----
 
B

Bo Yang

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martijn Lievaart :
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

iD8DBQFFYUFa7tZp58UCwyMRApGvAKDVu8RZImvag2suU7U8aQv9kxgZMQCeNilu
MDxpE5Ryl+8PF8uH2FgrSzY=
=PyY+
-----END PGP SIGNATURE-----
 
A

anno4000

Bo Yang said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed)-berlin.de :
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top