[delphizip] Re: Maxdisksize FreeSize

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Fri, 6 Dec 2002 07:24:32 +1100

The 'Central Directory' has to at the end because it contains offsets from
start of  disks, number of disk and number of disks (on a WORM drive you
cannot update these things afterwards).
Also you start 'reading' a zip file from the end which gives you the last
'Central Directory' (unfortunately they did not allow for Daisy-chaining
them).

the general format of a zipfile if
{ext local header if spanned}
Local File Header1
File Data1
Data Descriptor1
...
Local File Header n
File Data n
Data Descriptor n
Central Directory
End of Central Record
{Zip comment - actually part of EOC record}

no headers may be split, but central directory may be except for it's
headers.
You cannot put the 'Central Directory' on each disk except if you had
finished the file data and it's descriptor first, also I don't know that
anyone allows for local headers after the Central Directory (ZipMaster says
error if not followed by EOC record

A better way would be to search all required files into a list then
intelligently aportion them to make separate zipfile for each disk
Russell Peters
http://www.users.bigpond.com/russellpeters/delphizip.html


----- Original Message -----
From: "Roger Aelbrecht" <Roger.Aelbrecht@xxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Thursday, December 05, 2002 4:56 AM
Subject: [delphizip] Re: Maxdisksize FreeSize


>
> ----- Original Message -----
> From: "Alistair George" <bigal@xxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Wednesday, December 04, 2002 9:03 AM
> Subject: [delphizip] Maxdisksize FreeSize
>
>
> >
> > Hello,
> > Just a thought, but why limit disk sizing specifications to spanned
disks?
> > I figure it would be useful to allow disk sizing spanned or unspanned
and
> leave
> > the application of it to the programmer.   EG I could allow MaxSize in
> spanned
> > mode OR/AND non-spanned, that check is so simple.
> >
> > I would personally like to be able to determine a disk size of 520Mb
> (CDRW) and
> > write to it - any excess files will be shown up in the missed files
report
> and
> > it gives the user a learning on approximate selection numbers needed to
> fill up
> > one disk.
> >
>
> Sounds interresting will look if can be implented.
>
>
> > A major weakness of the current ZIP format is its slowness in returning
a
> file
> > within a spanned archive. Usually I make CDRW archives in segments, so
> that retrieval
> > is within the same disk.
>
> To be honest I think this was the way it was originlly inteded to be.
> The whole issue of wrting to CD and CDRW came up long after the PKZIP
> format was defined.
>
> Personnly I still don't understand why the Central Directory has to be at
> the end
> (or last disk) in fornt or onthe first disk would make things much easier.
> But then again we are restarting the discussion of a new format.;-)
>
>
> > Regards,
> > Alistair+
> >
> >
>
> Regards,
> Roger Aelbrecht
> http://web.wanadoo.be/driehoeksw
>
> >
>
>
>



Other related posts: