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

Discussion in 'Perl Misc' started by Bo Yang, Nov 19, 2006.

  1. Bo Yang

    Bo Yang Guest

    -----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-----
    Bo Yang, Nov 19, 2006
    #1
    1. Advertising

  2. Bo Yang

    Sisyphus Guest

    "Bo Yang" <> wrote in message
    news:ejp5u1$b68$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
    Sisyphus, Nov 19, 2006
    #2
    1. Advertising

  3. Bo Yang

    -berlin.de Guest

    Bo Yang <> 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
    -berlin.de, Nov 19, 2006
    #3
  4. 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.
    Martijn Lievaart, Nov 19, 2006
    #4
  5. 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.
    Martijn Lievaart, Nov 19, 2006
    #5
  6. Bo Yang

    -berlin.de Guest

    Martijn Lievaart <> 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
    -berlin.de, Nov 19, 2006
    #6
  7. On Sun, 19 Nov 2006 21:48:32 +0000, anno4000 wrote:

    > Martijn Lievaart <> 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.
    Martijn Lievaart, Nov 19, 2006
    #7
  8. Bo Yang

    Bo Yang Guest

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

    -berlin.de :
    > Bo Yang <> 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

    iD8DBQFFYUEU7tZp58UCwyMRAumqAKDhHOjkofxXZm14dsiozj9xt5PzXwCggeRA
    Lrvg89CgzWSh3UPFljL+Y5Y=
    =5Mlz
    -----END PGP SIGNATURE-----
    Bo Yang, Nov 20, 2006
    #8
  9. Bo Yang

    Bo Yang Guest

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

    iD8DBQFFYUFa7tZp58UCwyMRApGvAKDVu8RZImvag2suU7U8aQv9kxgZMQCeNilu
    MDxpE5Ryl+8PF8uH2FgrSzY=
    =PyY+
    -----END PGP SIGNATURE-----
    Bo Yang, Nov 20, 2006
    #9
  10. Bo Yang

    -berlin.de Guest

    Bo Yang <> wrote in comp.lang.perl.misc:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > -berlin.de :
    > > Bo Yang <> 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
    -berlin.de, Nov 20, 2006
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Graham Wood
    Replies:
    3
    Views:
    532
    A. Sinan Unur
    Jan 11, 2004
  2. Twig
    Replies:
    1
    Views:
    126
    A. Sinan Unur
    Jan 27, 2006
  3. MoshiachNow
    Replies:
    2
    Views:
    270
    Ilya Zakharevich
    Oct 4, 2006
  4. MoshiachNow

    Archive::Zip - zip file has "invalid" format

    MoshiachNow, Oct 5, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    165
  5. Replies:
    1
    Views:
    96
Loading...

Share This Page