[fpc-pascal] FPC Zip library
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Thu Feb 7 18:57:41 CET 2008
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"
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.
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).
thanks,
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list