From: Ned Konz Date: 2001-11-01T00:21:17+09:00 Subject: [ruby-talk:23960] Re: RubyGems Discussion On Wednesday 31 October 2001 12:24 am, Robert Feldt wrote: > > - quickly reading the file list without looking at the rest of the > > file. > > - quickly reading one of the embedded files without looking at the > > rest of the file. > > Ok, agreed. One bad thing with the last req is that we might loose some > opportunities for compression (compressing the whole gem will probably > give higher compression than compressing on a fil-by-file basis). I would > think that the zip format has a solution to this? (I thought zlib have > support for stream-based compression which allows positional access on > the compressed stream?) I would recommend a format (perhaps Zip) in which each constituent file can be compressed or not; otherwise, you have to decompress the whole thing to even read the contents. Though for small files that isn't too bad either. I wouldn't worry too much about getting the last little bit of compression out of the files; there just isn't too much difference in size between a typical .tar.gz of small files and a zip file of the same (like 62K for zip and 54K for tar.gz for instance). One nice thing about the zip format is that you can do basic extraction (though not decompression) with very little code. So you could actually distribute a binary version of, say, ruby/zlib using a technique that used uncompressed data files. You should also look at the ActiveState PPD format that they use for Perl package distribution; though it has some limitations, it's an example of the kind of metadata that is required: Archive-Zip Provide an interface to ZIP archive files. Ned Konz (perl@bike-nomad.com) -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://bike-nomad.com