Page 1 of 1

Packer - Questions

Posted: Sat Aug 23, 2003 10:19 pm
by Megaborsti
I wanted to write a test-program to learn how to use the packer-functions, but I had some problems:

If I want to unpack the - say 2 - jpg´s I already pack in one file,
how do I have to do this? There is only one function to unpack memory.
I have no idea how to do this. :cry:

Could someone write a little example how to pack and unpack 2 files or only explain how to do it?

Posted: Sun Aug 24, 2003 6:43 am
by Denis
Hi Megaborsti,

take a look to Purearea.net web page. André has done an excellent page with about 600 examples of code.

It's here

http://www.purearea.net/pb/CodeArchiv/English.html

And take a look in this page to

Pack-Unpack_Split

and you will have examples to pack/unpak files


Denis

Posted: Sat Mar 06, 2004 3:27 am
by TIGER
You bettter pack memory
and use OpenFile command.
That way you wiil be able tio mix packed data vith other data
and you will have more control with your files.

Result = PackMemory(SourceMem, DestMem, Length,CompressionLevel)
if result is 0 then compression is failed
othervice its a packed data size.

Compressoin level use more than 3 (less than 3 hangs sometimes)
The memory can be written usind WriteData()
Make sure also write unoacked data size

To unpack the memory once when you loaded it
Result = UnpackMemory(SourceMem, DestMem)