From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.29.41 with SMTP id g9mr1874392obh.27.1458117393565; Wed, 16 Mar 2016 01:36:33 -0700 (PDT) X-Received: by 10.182.144.226 with SMTP id sp2mr27432obb.13.1458117393493; Wed, 16 Mar 2016 01:36:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no2091218igb.0!news-out.google.com!k1ni10igd.0!nntp.google.com!nt3no2091213igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 16 Mar 2016 01:36:33 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=57.79.21.1; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 57.79.21.1 References: <5c099b3d-2605-491e-921b-66a7a8eca885@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Poll for the users of ZLib-Ada From: gautier_niouzes@hotmail.com Injection-Date: Wed, 16 Mar 2016 08:36:33 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29796 Date: 2016-03-16T01:36:33-07:00 List-Id: On Tuesday, March 15, 2016 at 10:55:30 PM UTC+1, Randy Brukardt wrote: > Wasn't the purposes of those lower levels to use less CPU time and space? > But that hardly matters anymore, because the difference between 0.010 sec > and 0.022 sec isn't noticable (CPUs are 1000x), and we have oceans of memory > compared to the 1980s when ZIP was invented. Well, 0.022 sec is more than the double than 0.010 sec! You'll notice a kind of difference when you process large data... Concerning memory, agreed, it is no more a concern. BTW, the zip/zlib code uses the same buffers for all compression levels. The compression level is used to select various thresholds for the pattern matching algorithm. > They probably need to exist because of compatibility with old ZIP files but > even in the 1980s I don't think they were used much (I don't recall ever > using them on purpose, although I think PKZip would sometimes decide to use > them itself for whatever reason). Old (or new) Zip files need to be *decompressed*. You don't need a compression software to read them, and even less to choose a compression level, in the zlib sense. What some versions of PKZip did was to choose between two formats: Shrink (LZW) and Reduce (LZ + probabilistic reduction). For a Zip file built by that version of PKZip, you would need a decompression software that is supporting both Shrink and Reduce formats, like Zip-Ada. Actually there may be various strategies depending on the input data, and on various scopes. Within the Deflate format there are 3 sub-formats for compressing chunks of data. For instance the compression algorithm can choose to store the chunk (or the entire file) if data is too random for being efficiently compressed. On a larger scope, you can have a pick-and-choose strategy, as in the ReZip tool, and select the most efficient compression (format and algorithm) for each file. Currently ReZip tries 20 variants, some with randomized parameters: Shrink Reduce_4 Deflate_f Deflate_1 Deflate_2 Deflate_3 External: Zip, -9 External: 7-Zip, a -tzip -mm=deflate -mfb=258 -mpass=#RAND#(7,15) -mmc=10000 External: 7-Zip, a -tzip -mm=deflate64 -mfb=257 -mpass=15 -mmc=10000 External: KZIP, /rn /b0 External: KZIP, /rn /b#RAND#(0,128) External: KZIP, /rn /b#RAND#(128,2048) External: Zip, -#RAND#(1,9) -Z bzip2 External: 7-Zip, a -tzip -mm=LZMA -mx=9 External: 7-Zip, a -tzip -mm=LZMA a=2 d=19 mf=bt3 fb=128 lc=0 lp=2 External: 7-Zip, a -tzip -mm=LZMA a=2 d=#RAND#(3200,3700)k mf=bt4 fb=#RAND#(255,273) lc=2 lp0 pb0 External: 7-Zip, a -tzip -mm=LZMA a=2 d=25 mf=bt3 fb=255 lc=7 External: 7-Zip, a -tzip -mm=LZMA a=2 d=26 mf=bt3 fb=222 lc=8 lp0 pb1 External: AdvZip, -a -4 _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address