[fpc-pascal] FPC Zip library
Michael Van Canneyt
michael at freepascal.org
Thu Feb 7 20:19:02 CET 2008
On Thu, 7 Feb 2008, Felipe Monteiro de Carvalho wrote:
> On Jan 28, 2008 10:07 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> > Doesn't the zipper unit that comes standard with FPC suit your needs ?
> > As far as I know, there is no special treatment needed for directories,
> > just add the file with a name like subdir/filename.ext ?
> Well, I tryed it, but I got stuck with some problems:
> 1 - I couldn't find anyway to tell it how the file will be called
> inside the Zip file, and therefore I can't add the file "with a name"
It has the same name as the TStringlist item.
> There is TZipper.ZipFiles and receives a TStringList with the names of
> the files on disk to be zipped. There is no parameter to tell how the
> files will be called inside the Zip file.
> I tryed to follow the code to see it something like that is possible,
> and a found a TZipItem with some structure members about a path.
> Unfortunately both refer too to the file on the disk that will be
> zipper, nothing about the name inside the zip file.
I'm sure this can easily be remedied.
> 2 - It doesn't allow to give a stream of data to be compressed into a
> zip file. My data is on memory, saving it and re-reading is a waste.
> This one is easy to fix without knowledge of zip format, and I started
> building a TZipper. ZipStreams, but then I met problem 1 and gave up,
> because it is a show stopper, and not at all easy to solve (I don't
> understand anything about zip file structure).
This is a bit harder, and needs to be looked into.
If you could add these as feature requests on the bugtracker, then
I won't forget about them...
More information about the fpc-pascal