Attila Kovacs 629 Posted November 7, 2022 (edited) I'd still go with compressionmode 1 and 25sec instead of 18% better compression and almost twice the time. HDD is cheap, time isn't. Edited November 7, 2022 by Attila Kovacs Share this post Link to post
Clément 148 Posted November 7, 2022 I downloaded the personal version an yet... the same results... Share this post Link to post
rvk 33 Posted November 7, 2022 10 minutes ago, Clément said: I downloaded the personal version an yet... the same results... What happens if you set the CompressionMode to 5? If it's still the same size, can you test with the file from http://mattmahoney.net/dc/textdata.html In that case we are talking about the same file. It could be that your file is extra compressible by the way Windows does it. And if it still does not compare, you might want to post some code. Share this post Link to post
Clément 148 Posted November 7, 2022 I did some more digging.... I built this test using a single file, then combining files 3&4 and then 3&4&5. I'm using zipForge clNormal compression, that's why the size from 3&4&5 from this test is bigger than the previous one (using clMax). As you can see, zipForge beats windows in every challenge. zipforge huge 3 has 182MB against windows 187MB . The same goes for the other 2. If we add zip forges 3 single files add up to 320MB... if we add Windows zip 3 single files, they also add up to 320MB ... My best guess is that windows zip uses all 3 files combined to achieve a better compression result. Share this post Link to post
rvk 33 Posted November 7, 2022 3 minutes ago, Clément said: My best guess is that windows zip uses all 3 files combined to achieve a better compression result. Yes, That's what I expected. I'm not sure if you can tinker with the buffer settings of TZipForge to achieve the same result. (maybe the bigger the buffer, the faster it sees there is some repetition.) Did you also test CompressionMode 5? (CompressionMode <> CompressionLevel). BTW. Just a stupid question... but did you unzip your Windows-zip to see if the result is correct Share this post Link to post
Clément 148 Posted November 7, 2022 (edited) 14 minutes ago, rvk said: Did you also test CompressionMode 5? (CompressionMode <> CompressionLevel). Huge 5_mode 5 is faster 15s. Huge 5 (normal) zipped in 19s. Windows10zip files uncompresses fine using windows in anyway ( explorer and extracting one file, or using menu ). I can decompress Windows10 zip with WinRAR 6.11 and Peazip 8.1.0. So windows is using some archiving method other applications can uncompress, including zipForge. I just uncompressed windows10zip file using zipforge and it worked as expected. There's must a be way to combine the files to compress even more. Anyway, it's good know windows is going this far! Hopefully there are some tweaking we can do to achieve the same results Edited November 7, 2022 by Clément Share this post Link to post
FredS 138 Posted November 7, 2022 23 minutes ago, Clément said: My best guess is that windows zip uses all 3 files combined to achieve a better compression result. Wouldn't it be simpler just to use ShellAPI and Windows to zip? Share this post Link to post
Clément 148 Posted November 7, 2022 2 minutes ago, FredS said: Wouldn't it be simpler just to use ShellAPI and Windows to zip? My ending product will be a Window Service available in both 32 and 64 bits. My next step is looking for some library or a way to use windows zip in my application. And of course, combine files carefully to achieve best compression. But I'm still digging... Share this post Link to post
Alexander Sviridenkov 356 Posted November 7, 2022 You can register own ZCompression stream implementation based on libdeflate, it will be much faster than default implementation. Share this post Link to post
David Heffernan 2345 Posted November 7, 2022 5 hours ago, Angus Robertson said: but then we are into DLL hell That's trivial to deal with these days by putting all dependent DLLs into an assembly that sits alongside your executable. Share this post Link to post
David Heffernan 2345 Posted November 7, 2022 39 minutes ago, FredS said: Wouldn't it be simpler just to use ShellAPI and Windows to zip? Very likely this would give a bad UX Share this post Link to post
David Heffernan 2345 Posted November 7, 2022 36 minutes ago, Clément said: My ending product will be a Window Service available in both 32 and 64 bits. Is 32 bit OS still a thing these days? We are about to drop support for it and probably should have done so some time ago. Share this post Link to post
Brian Evans 105 Posted November 7, 2022 The PPMd compression method does well with text files and is available in newer versions of Winzip and other archivers like 7zip. Share this post Link to post
Clément 148 Posted November 7, 2022 2 hours ago, Alexander Sviridenkov said: You can register own ZCompression stream implementation based on libdeflate, it will be much faster than default implementation. Would you please elaborate? Share this post Link to post
Alexander Sviridenkov 356 Posted November 7, 2022 TZipFile has RegisterCompressionHandler method so you can register custom compression class that will call libdeflate for compression. Delphi headers for Libdeflate can be found on this forum. Share this post Link to post