Re: [cc2-dev-l] Re: FCW compressed files
>> On Wed, Mar 21, 2001 at 08:45:27PM -0000, bradds@... wrote:
>>> However, the basics are there, so now I can convert a compressed FCW
>>> to an uncompressed FCW on a Unix machine.
On Fri, Mar 23, 2001 at 01:28:25AM -0700, Mike Riddle wrote:
> Note that a compressed FCW file is NOT a PKZIP file - the file, after
> the 128-byte file id block, is compressed using the same algorithms
> used by PKZIP, but does not have a ZIP file's internal directory
That's right. That's why you need a script and not just PKZIP to do it.
The easiest way to uncompress an FCW is with the PKWare library, but I
don't have $700 to buy the libraries for Windows and Unix for what is
basically a hobby project. Fortunately, with a little extra work, PKZIP
can do the job (for decompression anyway).
The steps involved are:
1. Extract and save the FCW file ID header.
2. Wrap the compressed stream with a ZIP header and central directory.
3. Decompress with PKZIP.
4. Re-attach the data to the FCW header.
The tricky part is to do it in such a way that PKZIP doesn't leave
droppings all over the place.
> As to PKZIP in UNIX being awful, I can't say, but I have always liked
> and used PkWare's programs (and Data Compression Library) and have
> found them stable and fast. And I've *never* had bugs in their
> products cause me trouble. I really respect their products.
Oh, PKZIP for Unix seems to work well enough -- it's not buggy or
anything. It's just that it has some quirks that are acceptable in a
Windows/DOS environment that are inappropriate on a Unix system. For
example, every time you run it, it writes a configuration file in the
current directory. In Unix, that sort of thing belongs in a hidden
file in your home directory -- dropping files in the current directory
is not only not always possible, but it's a data integrity and security
I was also going to complain that there's no way to decompress to
standard output (instead of to a file), but I just found that one! I
still haven't figured out whether it's possible to supply the ZIP file
on standard input instead of as a filename.
In short, it's not that it's a poor program, it's that it has an
extremely poor Unix command interface. Now, for somebody who's
accustomed to using PKZIP-DOS, that's an advantage, but it makes it very
difficult for seasoned Unix users, especially if you're trying to write
Bradd W. Szonye Work: bradd@...
Software Design Engineer Home: bradds@...
Hewlett-Packard Cupertino Site, iFL Phone: 408-447-4832
- On Fri, Mar 23, 2001 at 09:50:01AM -0800, Bradd W. Szonye wrote:
> The steps [to decompress an FCW] are:Well, that turned out not to be the tricky part after all. On the
> 1. Extract and save the FCW file ID header.
> 2. Wrap the compressed stream with a ZIP header and central directory.
> 3. Decompress with PKZIP.
> 4. Re-attach the data to the FCW header.
> The tricky part is to do it in such a way that PKZIP doesn't leave
> droppings all over the place.
surface, the files appear to decompress correctly, but when I try to
actually read the FC chunks, it falls apart. There are corrupted bits
here and there, and the files appear to get truncated slightly. Unless I
make some sort of radical breakthrough, it looks like I'm going to need
to leave this alone for now. Oh well -- I have lots of other projects
I'm working on.
Sorry if I got anyone's hopes up! (Assuming, of course, that anyone
other than me is interested in this.)
Bradd W. Szonye Hewlett-Packard: Home:
Software Engineer bradd@... bradds@...