Harry
New Member
Posts: 10
|
Post by Harry on Jul 6, 2006 2:21:25 GMT -5
Hi, I've got a program processing files/objects in a recursive way. Now I'd like to add these to a zip as streams, but VCLZip does not allow this in a usable way. Every time I call ZipFromStream the whole zip gets recreated. So I tried to derive from TVCLZip and add three methods like "beforeAddStream" AddStream" and "FinishedAddingStreams" using a copy of the code of the TVCLZip.ProcessFiles procedure, but with no success. Do can help me? Or would you add such a feature?
|
|
|
Post by Kevin on Jul 8, 2006 6:34:35 GMT -5
Hi Harry, I'm not sure if this is what you are after or not, but there is an example project that uses ZipFromStream and OnGetNextStream to zip several streams into an archive. This OnGetNextStream allows you to zip several streams without recreating the archive each time. Note that there are two examples. For D6 or D7 use: www.vclzip.net/ongetnextstream.zipfor D4 or D5 use: www.vclzip.net/ongetnextstreamd4d5.zipWhen working with streams, D4 and D5 require that you use TkpHugeStreams, in this case TkpHugeMemorySteam, while in D6 and D7 you can use regular TStreams. This is because D6 and D7 TStreams have Int64 capabilities but D4 and D5 TStreams do not. Kevin
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Jul 12, 2006 4:13:53 GMT -5
Hi, yes I know this. But using the OnGetNextStream event is not possible if you like to add streams out of an recursive program structure. Imagine you have a function recursively processing objects and for some special objects/subobjects you call a method "saveObjectStreamToZip". So only this method knows the stream to be currently zipped. Using the OnGetNextStream event would mean this event needs to get a reference to the next stream of the recursive method which means that the recursive method must wait for the OnGetNextStream event respectively vice versa. This would be very complex especially because all this is already multithreadded. My derived TVCLZipEx class adds this possibility by adding the three methods "beforeAddStream" AddStream" and "FinishedAddingStreams" using a copy of the code of the TVCLZip.ProcessFiles procedure and it works for creating new zip files. But I can't get it to work on existing zip files for replacing existing entries/files. Would take a look at it?
|
|
|
Post by Kevin on Jul 13, 2006 6:51:33 GMT -5
Sure, I will try to take a look at it. Kevin
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Jul 14, 2006 3:38:55 GMT -5
Thanks, I just sent you mail with my TVCLZipEx unit as zipped attachment.
Harry
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Aug 28, 2006 9:52:59 GMT -5
Hi, how things did you find time for looking at my problem?
|
|
|
Post by Kevin on Sept 23, 2006 7:29:51 GMT -5
Sorry, I have not had time to look at that. I have been really busy and that is a bit more complicated than I have had time to deal with.
Kevin
|
|
anoa
New Member
Posts: 1
|
Post by anoa on Oct 3, 2006 4:49:01 GMT -5
Hi Kevin,
I need this functionality too. Do you have an idea when you will have time to look at it?
Peter.
|
|
|
Post by Kevin on Oct 4, 2006 6:47:09 GMT -5
I have re-contacted Harry for more information and will be looking at it soon. Sorry for the slowness in looking at this, but this is something that will require a decent block of time to investigate.
Thanks,
Kevin
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Jan 3, 2007 8:25:53 GMT -5
Hi Kevin, I did send you a demo project on the 9th of Nov. 2006. Did you receive it? Did you find time to examine that problem?
Greetings
Harry
|
|
|
Post by Kevin on Jan 10, 2007 22:23:12 GMT -5
Yes, I got it. Unfortunately we are out of sync. When you sent it I was working on another project. Well actually a VCLZip project, I was adding strong encryption to VCLZip.
I have just about finished that so I will hopefully get a chance to look at it soon. Sorry about the delay.
Kevin
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Aug 24, 2007 9:54:51 GMT -5
Hi, more than half a year ago... what's about this? Did you find time to have a closer look on this?
Harry
|
|
Harry
New Member
Posts: 10
|
Post by Harry on Nov 13, 2007 4:56:53 GMT -5
Hi, nice to see you back. What about that feature here? Will it be included in VCLZip 3.1 or 4.0?
Greetings
Harry
|
|
|
Post by Kevin on Nov 13, 2007 7:37:36 GMT -5
Hi Harry,
Version 3.1 will pretty much just be bug fixes and performance improvements (memory usage). Version 4.0 will definitely include strong encryption. We'd like to get that out by years end and don't want to slow that release down, so incrementally adding streams would be a good possibility for version 4.1.
Kevin
|
|