RE: [GD-General] Building pak/zip files
Brought to you by:
vexxed72
From: Gareth L. <GL...@cl...> - 2001-12-06 20:47:31
|
Hmm, you might want to look at the zip file definition again (http://www.pkware.com/support/appnote.html). If you seek to the end of the file, make sure you don't have comments or Zip64 code ( Both a logical requirement for a game based zip file ) then the last 16 bytes will be: <quote> number of this disk: (2 bytes) The number of this disk, which contains central directory end record. If an archive is in zip64 format and the value in this field is 0xFFFF, the size will be in the corresponding 4 byte zip64 end of central directory field. number of the disk with the start of the central directory: (2 bytes) The number of the disk on which the central directory starts. If an archive is in zip64 format and the value in this field is 0xFFFF, the size will be in the corresponding 4 byte zip64 end of central directory field. total number of entries in the central dir on this disk: (2 bytes) The number of central directory entries on this disk. If an archive is in zip64 format and the value in this field is 0xFFFF, the size will be in the corresponding 8 byte zip64 end of central directory field. total number of entries in the central dir: (2 bytes) The total number of files in the .ZIP file. If an archive is in zip64 format and the value in this field is 0xFFFF, the size will be in the corresponding 8 byte zip64 end of central directory field. size of the central directory: (4 bytes) The size (in bytes) of the entire central directory. If an archive is in zip64 format and the value in this field is 0xFFFFFFFF, the size will be in the corresponding 8 byte zip64 end of central directory field. offset of start of central directory with respect to the starting disk number: (4 bytes) Offset of the start of the central directory on the disk on which the central directory starts. If an archive is in zip64 format and the value in this field is 0xFFFFFFFF, the size will be in the corresponding 8 byte zip64 end of central directory field. </quote> Also you should be able to assume that you don't use multidisk spanning. _____________________ Regards, Gareth Lewin Lead Programmer Climax Development Fareham Heights Standard Way Fareham P016 8XT > -----Original Message----- > From: Brian Sharon [mailto:bs...@mi...] > Sent: 06 December 2001 18:47 > To: Thatcher Ulrich; Tom Spilman > Cc: gam...@li... > Subject: RE: [GD-General] Building pak/zip files > > > Things like WinZip will (by default) try to compress > everything, so you > would want to set command line flags to disable compression for > uncompressible things like sound files. > > And I can't imagine a zip implementation that wouldn't add > files to the > end of the zip in the order that you insert them, because the > alternative (shifting files down) would be so inefficient. > > But the worst part of zip files is that the catalog lives at an > unspecified distance from the end of the file, so opening an archive > means seeking to somewhere near the end and walking around looking for > the catalog. If you're really worried about speed, you > probably want to > have a post-process step where you generate another copy of > that catalog > in a spot where it can be loaded quickly...like placed on the > DVD, right > in front of the zip archive. > > --brian > > -----Original Message----- > From: Thatcher Ulrich [mailto:tu...@tu...] > Sent: Thursday, December 06, 2001 6:21 AM > To: Tom Spilman > Cc: gam...@li... > Subject: Re: [GD-General] Building pak/zip files > > On Dec 05, 2001 at 05:41 -0600, Tom Spilman wrote: > > > Zip file tools don't generally give you control over what > > > gets compressed and what doesn't(I think). > > > > Actually i don't think this is necessarily true > > It doesn't actually matter -- zip tools generally will choose the best > method of compression for each file, so .jpg's or .mpg's will be > stored uncompressed. > > > nor that you cannot > > specify the order of the contents of the zip file. Check out > > http://www.winzip.com/wzcline.htm which adds command line support to > WinZip. > > Infozip's command-line zip apparently stores things in the order you > specify. Also, it's open source under a X-style license, so you can > hack stuff in or incorporate the code in your project. There's also > zlib from the same project, designed for embedding. We use zlib at > Oddworld for unpacking resource files. > > http://www.info-zip.org/ > http://www.gzip.org/zlib/ > > -- > Thatcher Ulrich <tu...@tu...> > http://tulrich.com > > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > |