packer
Posted: Tue Jun 10, 2003 12:22 pm
hi,
Ive been trying to use the packer library to create a single compressed file from multiple files. this part was easy enough.
Now I need to unpack the files were I'm now stuck. 3 questions to start with...
1. Is the original filename stored in the pack file? (if not can it be added)
2. If so how can i return this?
3. The following code compiles but just does not work, what am I missing?
(actually I have just had to re-type this into notepad cos I'm at work and forgot to put the file onto my CVS - so I have no idea if it does compile in this state)
I just seen an old post about RAR examples on RMP - gonna have a look into that as a possible alternative....
..and If filenames are not included I guess I could create my own TOC section prefixed onto the packed file......damn, going to have to stop solving my own questions while writing these posts...
Anyhow, my code problem is still there
Any other comments suggestions very welcome.
Ive been trying to use the packer library to create a single compressed file from multiple files. this part was easy enough.
Now I need to unpack the files were I'm now stuck. 3 questions to start with...
1. Is the original filename stored in the pack file? (if not can it be added)
2. If so how can i return this?
3. The following code compiles but just does not work, what am I missing?
Code: Select all
; unpack test
; iant 2003
OpenConsole()
If OpenPack("MYPACKEDFILE")
memloc.l = NextPackFile
UnpackedFileSize.l = PackFileSize()
OpenFile(#1,"MYUNPACKEDFILE")
WriteData(*memloc,UnpackedFileSize)
CloseFile(#1)
Else
PrintN("CRAP, CANT FIND FILE")
EndIf
CloseConsole()
End
I just seen an old post about RAR examples on RMP - gonna have a look into that as a possible alternative....
..and If filenames are not included I guess I could create my own TOC section prefixed onto the packed file......damn, going to have to stop solving my own questions while writing these posts...
Anyhow, my code problem is still there
Any other comments suggestions very welcome.