[delphizip] Re: Best approach?

  • From: "zifnabbe@sourceforge" <zifnabbe@xxxxxxxxxxxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 23 Nov 2004 14:40:35 +0100

Thanks,

I've made something similar as in Demo9, but on advice of Russell, I use
only one ZipMaster.

I've created a thread, which contains a TStringList.
Files can be added in this StringList.
The Thread keeps running until the stringlist is empty. If the stringlist is
empty, the thread is going into suspend mode.
When files are added to the stringlist, the thread resumes.

When working with a file, the thread waits until zipmaster is not busy.
After that the thread moves to the next file in the stringlist.

Please, if you've some remarks on this approach, let me know.

Thanks!

----- Original Message ----- 
From: "Roger Aelbrecht" <Aelbrecr@xxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Friday, November 19, 2004 7:15 PM
Subject: [delphizip] Re: Best approach?


zifnabbe@sourceforge wrote:
> Hi,
> I need to compress a batch of single files. eg:
>
> file1.txt -> file1.zip
> file2.txt -> file2.zip
> etc
>
> What is the best approach?
>
> Using 1 zipmaster component? Do I've to take care if the previous
> zipfile creation is finished? Or is changing the  ZipFileName ok?
>

Yes that is the best way. If you change the ZipFileName while
zipmaster is busy then you get a Re-entry error.


> Using zipmaster in a thread which is called for each file (this means
> loading/unloading the dlls for each file) and finishing the thread
> when zipbusy is false?
> Is there an example of using zipmaster in a thread?
>

Yse look at Demo9

> Thanks!
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.



-- 
Roger Aelbrecht
http://home.tiscali.be/driehoeksw



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.3.1 - Release Date: 15/11/2004

-----------
To unsubscribe from this list, send an empty e-mail
message to:
  delphizip-request@xxxxxxxxxxxxx
and put the word unsubscribe in the subject.

-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: