SV: SV: [ANN] Archive 0.2


(Thomas Sondergaard) #1

The date field should be fixed in CVS. The other fields you mention are currently being filled with zeros. They are not too important (I believe), but now that you have pointed my attention towards it, I’ll try to do better. I’ll take a look at your perl module for inspiration regarding required version etc.

Do you have the non-MSDOS permission bits encoded/decoded in your perl module? Have any good links to reference documentation? I’ve used pkware’s appnote.zip spec of the zip file format as the only documentation, except for the msdos time format, which I’ve found somewhere else (and boy does it stink, the msdos timeformat that is)

Thomas

-----Oprindelig meddelelse-----
···

Fra: Ned Konz [mailto:ned@bike-nomad.com]
Sendt: ma 08-07-2002 00:56
Til: ruby-talk ML
Cc:
Emne: Re: SV: [ANN] Archive 0.2

On Sunday 07 July 2002 03:23 pm, Thomas Søndergaard wrote:

> If you are bent on putting the zip functionality into your archive
> module, you can "borrow" the relevant code from rubyzip - though
> I'd like to think rubyzip is good enough in it self :-)

Aren't you missing some header fields? From zipinfo -v on one of the constructed files:

  file system or operating system of origin:        MS-DOS, OS/2 or NT FAT
  version of encoding software:                     0.0
  minimum file system compatibility required:       MS-DOS, OS/2 or NT FAT
  minimum software version required to extract:     0.0
  file last modified on (DOS date/time):            1980 000 0 00:00:00
  non-MSDOS external file attributes:               000000 hex
  MS-DOS file attributes (00 hex):                  none

You can lift some of the code for this from my Perl Archive::Zip module,
though it's probably better to add the appropriate Unix extra fields for times
and owners/permissions as well as using the DOS info.

--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

(Ned Konz) #2

The date field should be fixed in CVS. The other fields you mention
are currently being filled with zeros. They are not too important
(I believe), but now that you have pointed my attention towards it,
I’ll try to do better. I’ll take a look at your perl module for
inspiration regarding required version etc.

I’m wary because I’ve seen some very touchy behavior from some Zip
programs (especially WinZip). I’ve had to make changes to my code to
make it write certain formats even though I was following the Zip
spec.

Do you have the non-MSDOS permission bits encoded/decoded in your
perl module?

No, but people have been bugging me to do this .

Have any good links to reference documentation? I’ve
used pkware’s appnote.zip spec of the zip file format as the only
documentation, except for the msdos time format, which I’ve found
somewhere else (and boy does it stink, the msdos timeformat that
is)

Yes, it’s pretty bad.

One user of Archive::Zip told me that there was a bug because half the
time he made zips the mod times would be off by one second. Of
course, with a 2-second resolution…

I’d use the Info-Zip sources for zip and unzip as a reference. Though
they’re not pretty (rather complicated C), they seem to handle a
number of the “extension fields”. Of course, the extension fields
themselves were a pretty ugly part of the Zip spec.

For fun, look at the (many) different ways people have encoded
Creator/FileType info in Mac zip programs.

···

On Sunday 07 July 2002 04:10 pm, Thomas Søndergaard wrote:


Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE