[lug] compressed cpio archive problems

S. Luke Jones luke at frii.com
Sun Nov 18 20:33:20 MST 2001


Tom Tromey wrote:
> Luke> Nobody has uncompress anymore (thanks a lot, Unisys) but gunzip
> Luke> has the equivalent capability.
> As others have pointed out, there is an uncompress for Linux.  On my
> RHL box it is in the ncompress RPM.

I meant to write "uses" not "has". Sure enough, there's not only
an uncompress (I understood the patent to allow that) but a compress
as well. I'll remember that in case I want to lose some data beyond
any hope of retrieval in the future.

> I don't think it is possible.  But don't take my word for it.  Find a
> coding expert.  Or you can read the paper on which compress is based;
> it is referenced in the man page.

Sigh. We had to do a project with one of those compression schemes
in graduate school. Afterwards, I told myself I'd never use anything
harder to wrap my brain around than RLE. If I were to go that route
it would tempt me to estimate the value of the content of these cpio
archives, which, since they contain old graduate school projects
(buggy implementations of compression schemes and the like) is --
sadly -- very close to zero.

> There's probably some small chance that there are bugs or
> incompatibilities between the compress you used to create this file
> and the current uncompress.  What media did you store these files on?

Let's see: they were created on a 3B1 and later transferred to a
386 PC running UNIX(tm). After that, I came up with .cpz as a three
letter extension so I could move them to a Windows PC, where they
spent a few years as unreadable collections of bits. I couldn't try
to estimate the number of times they survived system rebuilds on
consumer-grade tapes (CMS Jumbo 250 and Travan 3). After I got a
Linux PC and a CD-R I started using CD's for archival purposes.

> I.e., is there a reasonable chance that they are really corrupt?

There is a small but measurable chance they are not corrupt, but
the same could be said of any politician.  I wouldn't want to bet
on it, though; at least, not with my own money.

> Anyway one thing that might be worth trying is to find a system
> similar to the creating system and uncompress and unarchive there.

Other than Ebay, no. (See the provenance above.)

> Luke> cpio: warning: skipped 1247 bytes of junk
> 
> One route open to you, which you may not like, is to read up on the
> various cpio formats, and then examine the archive file using a hex
> editor.  As I recall (I hacked on GNU cpio for a short time back in
> 1994 or so), the cpio formats are pretty straightforward.  So this
> wouldn't be as hard a job as it sounds.

Sigh again. I realize you're being helpful here. It's just I wanted
some fairy godmother type to point out the -pdq switch to cpio that
I had missed in its 21-line usage screen. If I can successfully get
them uncompressed, I might actually try to un-cpio them this way.
I'm always -- well, really almost never -- looking for new ways to
learn how to use perl's unpack function. But the uncompression
double-whammy is sapping my microscopic enthusiasm for new projects
like this.

-- 
Luke Jones  luke vortex frii fullstop com



More information about the LUG mailing list