ar archives

Discussion in 'Ruby' started by Daniel Brumbaugh Keeney, Jan 11, 2008.

  1. Is there cross-platform way of extracting or creating `ar' archives?


    Daniel Brumbaugh Keeney
    Daniel Brumbaugh Keeney, Jan 11, 2008
    #1
    1. Advertising

  2. Daniel Brumbaugh Keeney

    Eric Hodel Guest

    On Jan 11, 2008, at 06:03 AM, Daniel Brumbaugh Keeney wrote:

    > Is there cross-platform way of extracting or creating `ar' archives?


    ar(5) on my system says this:

    > A file created with ar begins with the ``magic'' string "!<arch>
    > \n". The rest of the archive is made up of objects, each of which
    > is composed of a header for a file, a possible file name, and the
    > file contents. The header is portable between machine
    > architectures, and, if the file contents are printable, the archive
    > is itself printable.


    and proceeds to describe the latest version of the format which fits
    in about 26 lines. It should be really easy.

    It makes a note at the bottom of the magic strings for older versions
    of ar, but these are probably ancient.
    Eric Hodel, Jan 12, 2008
    #2
    1. Advertising

  3. Daniel Brumbaugh Keeney

    Thomas Hurst Guest

    * Eric Hodel () wrote:

    > On Jan 11, 2008, at 06:03 AM, Daniel Brumbaugh Keeney wrote:
    >
    >> Is there cross-platform way of extracting or creating `ar' archives?

    [answer, which from a Mac user might only apply to BSD ar?]

    Speaking of archive handling, a nice project for someone might be a Ruby
    interface to BSD's libarchive[1], which would provide instant support
    for tarballs of many different formats, cpio, pax, BSD/GNU ar, write
    support for shar and read support for ISO images and zip archives, as
    well as transparent gz/bz2/z handling. There's a Win32[2] port too.

    1: http://people.freebsd.org/~kientzle/libarchive/
    2: http://gnuwin32.sourceforge.net/packages/libarchive.htm

    --
    Thomas 'Freaky' Hurst
    http://hur.st/
    Thomas Hurst, Jan 13, 2008
    #3
    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. Ike
    Replies:
    1
    Views:
    371
    Andrew Thompson
    Jan 10, 2004
  2. Patrick

    Frontend for jar-archives?

    Patrick, Apr 9, 2004, in forum: Java
    Replies:
    4
    Views:
    517
    Steve Horsley
    Apr 10, 2004
  3. Replies:
    0
    Views:
    434
  4. Replies:
    0
    Views:
    378
  5. David Karr
    Replies:
    2
    Views:
    497
    J. Gleixner
    Jun 1, 2012
Loading...

Share This Page