Startbeitrag von Jimboam 28.03.2011 06:57
Hi friends,
I'm trying to use the zip-functions of WinDev 15 in order to offer a backup function for one of our programs.
1 - Only ZIP and WDZ are available for backup purposes, zipCreate(..) doesn't accept RAR
CAB: zipAddFile(..) stubbornly returns a 'no sufficient rights to add file' though the referenced HFClassic-file is closed immediately before doing the zipAddFile(..) and a wait for completion of file-closing with Multitask()
2 - I couldn't find any difference in the result of the compression after setting different levels of compression by MyArchive..compressionlevel = 1 -> 12
3 - the results could be worse, but they're far off from being best in their class ..
My reference is 7-zip from http://www.7-zip.org/
Using LZMA & LZM2 algorithm + compression level 'Ultra' a dataset of 2,46 Gb (HF Classic files) results in a compressed file of about 88 Mb.
Using WinDev ZIP the same dataset compresses to 259 Mb = 3 x bigger than .7z
Using WinDev WDZ the same dataset compresses to 402 Mb = 4.5 x bigger than .7z
Any comments? Any better / worse experiences? Any suggestions?
Kind regards,
Guenter
I'm trying to use the zip-functions of WinDev 15 in order to offer a backup function for one of our programs.
1 - Only ZIP and WDZ are available for backup purposes, zipCreate(..) doesn't accept RAR
CAB: zipAddFile(..) stubbornly returns a 'no sufficient rights to add file' though the referenced HFClassic-file is closed immediately before doing the zipAddFile(..) and a wait for completion of file-closing with Multitask()
2 - I couldn't find any difference in the result of the compression after setting different levels of compression by MyArchive..compressionlevel = 1 -> 12
3 - the results could be worse, but they're far off from being best in their class ..
My reference is 7-zip from http://www.7-zip.org/
Using LZMA & LZM2 algorithm + compression level 'Ultra' a dataset of 2,46 Gb (HF Classic files) results in a compressed file of about 88 Mb.
Using WinDev ZIP the same dataset compresses to 259 Mb = 3 x bigger than .7z
Using WinDev WDZ the same dataset compresses to 402 Mb = 4.5 x bigger than .7z
Any comments? Any better / worse experiences? Any suggestions?
Kind regards,
Guenter
I also worked with zip-functions in Windev and I also am not glad with the results.
No strong compression and the compression time is very large.
I also worked with a dll from Xceed which worked much better. But there are dozens af firms who offer a solution.
von Frans - am 28.03.2011 07:18
regards
issah
von issah - am 28.03.2011 09:39
Thanks to both of you! I already had the strong impression that something's not quite up to date here. At least they could have inserted the 7-zip algorithms LZMA + LZMA2 - they're completely free too use and offer the best compression one can get. Next best would be RAR, but WinDev doesn't offer that for creation. Ok, I'll have a look how to automate 7-zip or how to use it's command line version together with our program.
Kind regards,
Guenter
von Jimbo - am 28.03.2011 11:09
Could you keep us informed with your choice?
Thanks in advance.
von Frans - am 28.03.2011 12:46
Hi Frans, of course, I'll do so! Kind regards, Guenter
von Jimbo - am 28.03.2011 16:15
http://www.windev.at/html/7-zip_cli.html
I've done a first demo project for backup with 7-ZIP - have fun!
If there's time, I'll finish / test it till it works in every every corner ..
Kind regards,
Guenter
von Jimbo - am 31.03.2011 06:20
Thank you for your testing and sharing your project with us.
von Frans - am 31.03.2011 11:44
do I understand correctly that the zip-files created with 7zip cannot be read/extracted by the zip-functions of WinDev ?
von Stefan Bentvelsen - am 31.03.2011 14:39
You're welcome! Regards, Guenter
von Jimbo - am 31.03.2011 16:58
Hi Stefan, I firmly assume that ZIP-files created by 7-zip should be extractable by WinDev zip-commands. WinDev uses PKZIP and that's fairly standard. I did not try however. Other way around: I can confirm that 7-zip flawlessly extracts the WinDev-made zip-archives.
But, I did the whole exercise because the ZIP compression algorithm in general simply doesn't compare to the LZMA2 (= .7z) algorithm. To compress our 2,46 Gb using 7-zip and the built-in ZIP algorithm in 'Ultra' took about 40 minutes(!) and resulted in a 202 Mb file, while the LZMA2 algorithm took about 20 minutes and spat out an 89 Mb file. Btw, the 202 Mb are not that far off from WinDev's 259 Mb and I believe if I put
Usage of 7-zip 7zG.exe is quite fine for me and I think I will not need to dig further into this like by re-writing the LZMA2 into W-language.
Kind regards,
Guenter
von Jimbo - am 31.03.2011 17:29
Hi, I did an update of the write-up of http://www.windev.at/html/7-zip_cli.html
von Jimbo - am 03.04.2011 11:02
Good show.
best regards
Ola
von Ola - am 03.04.2011 11:51
It's very useful.
Best regards,
Hung
von Hung - am 04.04.2011 09:48
Re: ZIP-Functions + a note in ref to HFCS
Note for HyperFile SQL Client/Server:
The HFCC initiated backups do not compress anything! They're simply a copy of the contents of the server or of a single database. Same goes for HBackup(..). However, the hBackupDescription variable needed by HBackup(..) from v14 on offers the use of two stored procedures, one before and one after the backup process. I think, one could easily incorporate 7-zip compression within the 'procedure after ...'.
Regards,
Guenter
von Jimbo - am 06.04.2011 07:44