Page 15 of 40
Posted: Thu Feb 01, 2007 3:37 pm
by Thorsten1867
Thanks a lot!
I not really understand why, but your right.
Now it works perfect.
Posted: Mon Feb 05, 2007 3:50 pm
by Max
to gnozal
How to code when I need to compress a recursive folder (with PureZIP_AddFiles) which contains some files with accented characters?
PureZIP_AsciiDosLatinUS_To_AsciiWinLatin1 only transforms one string every time.
Yes, I can make ExamineDirectory (recursive) and transform one by one...but it's very heavy.. if we've some other option....
Posted: Mon Feb 05, 2007 4:01 pm
by gnozal
Max wrote:to gnozal
How to code when I need to compress a recursive folder (with PureZIP_AddFiles) which contains some files with accented characters?
PureZIP_AsciiDosLatinUS_To_AsciiWinLatin1 only transforms one string every time.
I am afraid you have to code your own recursive routine.
Max wrote:Yes, I can make ExamineDirectory (recursive) and transform one by one...but it's very heavy.. if we've some other option....
Not so heavy.
There is an example of recursive zipping (with relative paths) three posts above.
UNZIP and PNG imagedecoder
Posted: Sun Feb 11, 2007 3:49 pm
by Philippe-felixer76
I might be wrong, but is it possible when using
this great zip library with the pngimage decoder,
you get the message:
POLINK: error: Symbol '_inflate_copyright'is myltiply defined......
Re: UNZIP and PNG imagedecoder
Posted: Sun Feb 11, 2007 6:34 pm
by AL90
Philippe-felixer76 wrote:POLINK: error: Symbol '_inflate_copyright'is myltiply defined......
Do you use
PureZIP_AddFiles() ? With this command I get also some
problems in real TotalCommander. TC will give an error like
Unknown Format if I want Delete a File in Archive.
But the Archive is not corrupt. All Files can be normal Extracting. Now I use
PureZIP_Archive_Compress() and it will work better. Also in TC are
now no longer problems.
Possibly a bug in
PureZIP_AddFiles ? Currently I rewrite my Tool
Pure FileMaster
and will replace all AddFiles() with ArchiveCompress() for more
compatiblity in next version (v1.3)
Sorry for my bad English!
Re: UNZIP and PNG imagedecoder
Posted: Mon Feb 12, 2007 9:07 am
by gnozal
Philippe-felixer76 wrote:I might be wrong, but is it possible when using
this great zip library with the pngimage decoder,
you get the message:
POLINK: error: Symbol '_inflate_copyright'is myltiply defined......
Note :
There is a known problem with PureZIP and the ImagePluginPNG purebasic library. If you use both in the same program, you will get a POLINK error "Symbol '_inflate_copyright' is multiply defined" because both use the ZLIB static library.
I don't know how to fix this.
Re: UNZIP and PNG imagedecoder
Posted: Mon Feb 12, 2007 3:51 pm
by Max
AL90 wrote:
Do you use PureZIP_AddFiles() ? With this command I get also some
problems in real TotalCommander. TC will give an error like Unknown Format if I want Delete a File in Archive.
But the Archive is not corrupt. All Files can be normal Extracting.
Well, I'm also using TC (beta 3 at moment), and I've not any problem with PureZip, even deleting files from TC.
I'm using
PureZIP_AddFiles()
Code: Select all
Procedure Zipear(zipf.s, param.s, recur.l)
DeleteFile(zipf)
nFi = PureZIP_AddFiles(zipf, param, #PureZIP_StorePathRelative, recur)
WriteStringn(nFilog,"Comprimidos "+rset(str(nFi),6)+ " : "+GetFilePart(zipf))
EndProcedure
I've tested it now again, with my last night backups, and no problem...
Posted: Mon Feb 12, 2007 7:59 pm
by AL90
@Max
I use wildcards like this:
PureZIP_AddFiles(ZipFile$,fm_tmp$+"*.*",2,2)
and archive contains which is created so will TC not delete.
Now I'm finish with rewrite my Procedures and I have replace
all PureZIP_AddFiles() to PureZIP_Archive_Compress().
Result: TC will no longer get any errors and all works fine.
I can't explain why it is so. BTW: I have use any older TC version (6.51)
not the latest.
BTW:
PureZIP_AddFiles() will get #Null if I e.g. add an Empty Directory and
PureZIP_Archive_Compress() will get -1. I'm not sure if it is normal.
But I think it is IMHO not correct?!
Posted: Tue Feb 13, 2007 8:54 am
by gnozal
AL90 wrote:I use wildcards like this:
PureZIP_AddFiles(ZipFile$,fm_tmp$+"*.*",2,2)
and archive contains which is created so will TC not delete.
Probably because you are using #PureZIP_RecursiveZeroDirs (help file : 'recursive file search and add empty directories (
use only if necessary)').
It's a trick to add empty dirs (wich the ZLIB library I use does not normally allow), so the ZIP structure may be a little 'weird' for some archivers. But while it does not allow archive modification, the extraction works.
Do you also have this problem with #PureZIP_Recursive ?
AL90 wrote:BTW:
PureZIP_AddFiles() will get #Null if I e.g. add an Empty Directory and
PureZIP_Archive_Compress() will get -1. I'm not sure if it is normal.
But I think it is IMHO not correct?!
This is correct :
PureZIP_Archive_Compress() can't add a directory, it's for files, so you get an error.
Or the other hand, PureZIP_AddFiles()
tolerates empty dirs, but an empty dir has no files in it, so it returns 0 (filecount).
Posted: Tue Feb 13, 2007 8:37 pm
by AL90
gnozal wrote:Do you also have this problem with #PureZIP_Recursive ?
Yes. How I say I use Recursive. (See on Top) I have make a new test
with TC now and it the same problem:
ZIP-Archive is defekt or has a unknown format!
but (also complete) Extraction is possible
without errors.
Yourself can test it with PFM v1.2. BTW: I have now successfully
converted all AddFiles() in ArchiveCompress() and all will now
work 100% without errors. (Also TC will work now without errors)
But I can't more exact explain this phänomen. Sorry.
I will release 1.3 in the next few days. If you want you can
test it then in combination with real TC.
This is correct :
PureZIP_Archive_Compress() can't add a directory, it's for files, so you get an error.
Or the other hand, PureZIP_AddFiles() tolerates empty dirs, but an empty dir has no files in it, so it returns 0 (filecount).
Ok I think I understand you now.
Posted: Wed Feb 14, 2007 12:04 pm
by gnozal
AL90 wrote:gnozal wrote:Do you also have this problem with #PureZIP_Recursive ?
Yes. How I say I use Recursive.
In your example you use #PureZIP_RecursiveZeroDirs (2) and not #PureZIP_Recursive (1).
Posted: Wed Feb 14, 2007 8:10 pm
by AL90
gnozal wrote:In your example you use #PureZIP_RecursiveZeroDirs (2) and not #PureZIP_Recursive (1).
Yes, because I want add empty dirs. For my Tool I cannot ignore
selected EmptyDirs while copying. (same in real TC)
Posted: Mon Mar 19, 2007 8:46 am
by Morty
Hi at all.
I have a problem using this lib.
If I add an tga file, this file will be destroyed (inside the zip file and after decompressing). I can't use it after decompression.
Here's an example code:
Code: Select all
MyZip.s="C:\test\zip_test.zip"
MyZIPFile1.s="C:\Test\test_tga.tga"
If PureZIP_Archive_Create(MyZIP.s, #APPEND_STATUS_CREATE)
Debug PureZIP_Archive_Compress(MyZIPFile1.s, #False)
PureZIP_Archive_Close()
EndIf
Taken from the helpfile.
Here is the image:
http://www.morty-productions.de/zip_bug/test_tga.tga
And here is an image showing my problem:
I use PB 4.00 running on Win XP Professional. Downloaded the latest version of the library.
Hope someone could help.
Greetz, Morty
PS: Sorry for my bad english.
Posted: Mon Mar 19, 2007 9:02 am
by gnozal
Morty wrote:Hi at all.
I have a problem using this lib.
If I add an tga file, this file will be destroyed (inside the zip file and after decompressing). I can't use it after decompression.
I use PB 4.00 running on Win XP Professional. Downloaded the latest version of the library.
Note that there is a bug in the PB4.00 file library.
http://www.purebasic.fr/english/viewtop ... c&start=44
Please upgrade to PB4.02 and test again.
Posted: Tue Apr 17, 2007 12:22 pm
by gnozal
Update (Both libs)
Changes :
- (de)compression callback [set with PureZIP_SetCompressionCallback(*ProcedureAddress)] : if the callback returns #True, the (de)compression stops and the function returns a #PureZIP_CallbackStop error.
Code: Select all
Returned value [only for PureZIP_Archive_Compress() and PureZIP_Archive_Extract()] :
#FALSE : compression / extraction continues
#TRUE : compression / extraction stops !
PureZIP_Archive_Compress() and PureZIP_Archive_Extract() returns #PureZIP_CallbackStop error