PackMemory + PackerCallback

Just starting out? Need help? Post your questions and find answers here.
Tomio
Enthusiast
Enthusiast
Posts: 291
Joined: Sun Apr 27, 2003 4:54 pm
Location: Germany

PackMemory + PackerCallback

Post by Tomio »

Hello,

I have a program to pack files.
99% of the files are beeing packed within a reasonable time.
The packer / unpacker work good.

But there is always a file which cannot be packed.
My program takes 5-10 minutes to continue with PackMemory result = 0.

I inserted the PackerCallback planning to program some simple algorithm which stops the packer in case of beeing too slow.

But to my surprise, in these situations the PackerCallback also is not called. The docu says: "The time between two call isn't user definable, it will be calculated automatically." But the routine sleeps.

Does someone have an idea how to abort the packer?

Thank's../tomio

Added: There is at least one file, 200KB size, where the Callback won't do anything more after 26% of SourceMemory.
../tomio
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Try to put the compression level to 8 (I'm testing this).
Tomio
Enthusiast
Enthusiast
Posts: 291
Joined: Sun Apr 27, 2003 4:54 pm
Location: Germany

Post by Tomio »

Fred wrote:Try to put the compression level to 8 (I'm testing this).
With 8 it works. The same speed I'm used to see with 0.
Hmm, I never tried numbers higher 0, because the 0-compression is good enough for my needs and I expected higher values to be slower.

My tests with one file gives:

0, 2 bad
1, 8 good

From time to time I need to compress many files (~200). This is done in a loop. But it's bad if the loop stops somewhere in between. That's why for me it's important to have a callback which is not blocked.

Do you think you can solve it? Or do you think compression ratio 1/8 will do this?
../tomio
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, it should be a problem with internal buffer. I will fix it, thanks.
Post Reply