Results 1 to 7 of 7

Thread: rezop, recompress using zopfli while preserving blocksplit

  1. #1
    Member caveman's Avatar
    Join Date
    Jul 2009
    Location
    Strasbourg, France
    Posts
    190
    Thanks
    8
    Thanked 62 Times in 33 Posts

    rezop, recompress using zopfli while preserving blocksplit

    Early beta, has not been heavily tested.
    Code:
    rezop: recompress using Zopfli while preserving blocksplit.
    Version 0.1a (25 May 2015) by Frederic Kayser
    Zopfli compression algorithm by Lode Vandevenne and Jyrki Alakuijala
    Miniz (tinfl) code by Rich Geldreich
    Usage: rezop [options] infile[.png|.gz] outfile[.png|.gz]
    Options: -v verbose
             -i iterations (default is 10, try -i50 or more for better results)
    This tool is especially useful if you have PNG files already optimized by PNGOUT.
    For instance if I take the two files bigmac-new.png and getadrink-new.png from this message.
    Code:
    -rw-r--r--  1 Fred  staff  33864 26 mai 02:10 bigmac-new.png
    -rw-r--r--  1 Fred  staff  65225 26 mai 02:10 getadrink-new.png
    Picolo:testbed Fred$ rezop bigmac-new.png bigmac-renew10.png
    Picolo:testbed Fred$ rezop getadrink-new.png getadrink-renew10.png
    Picolo:testbed Fred$ rezop -i60 bigmac-new.png bigmac-renew60.png
    Picolo:testbed Fred$ rezop -i40 getadrink-new.png getadrink-renew40.png
    Picolo:testbed Fred$ ls -Sl
    total 600
    -rw-r--r--  1 Fred  staff  65272 26 mai 02:11 getadrink-renew10.png
    -rw-r--r--  1 Fred  staff  65252 26 mai 02:12 getadrink-renew40.png
    -rw-r--r--  1 Fred  staff  65225 26 mai 02:10 getadrink-new.png
    -rw-r--r--  1 Fred  staff  33864 26 mai 02:10 bigmac-new.png
    -rw-r--r--  1 Fred  staff  33837 26 mai 02:11 bigmac-renew10.png
    -rw-r--r--  1 Fred  staff  33827 26 mai 02:12 bigmac-renew60.png
    Picolo:testbed Fred$ huffmix getadrink-new.png getadrink-renew40.png getadrink-new.png
    IDAT new size 65157 (0xfe85) bytes, saved 93 bits, output file size 65214 bytes
    Picolo:testbed Fred$ huffmix bigmac-new.png bigmac-renew60.png bigmac-new.png
    IDAT new size 33755 (0x83db) bytes, saved 119 bits, output file size 33812 bytes
    Well you get the idea… use Deflopt and/or Defluff on the files produced by rezop before huffmixing them with the original.

    Mac archive has been update (first version led quickly to segfaults when run in 64 bits).
    Source code will follow in a week or two.
    Attached Files Attached Files
    Last edited by caveman; 26th May 2015 at 03:21.

  2. The Following 4 Users Say Thank You to caveman For This Useful Post:

    Bulat Ziganshin (31st January 2016),Intrinsic (27th May 2015),Jaff (26th May 2015),lorents17 (29th August 2015)

  3. #2
    Member Mr_KrzYch00's Avatar
    Join Date
    Apr 2015
    Location
    Poland
    Posts
    65
    Thanks
    10
    Thanked 40 Times in 24 Posts
    Nice. Now needs more options, like recompressing only specified block and to copy rest of stream (:

    It's worth to mention that there are cases when ONE BIG BLOCK /file is best for kzip but FAILS to produce smaller file when recompressed with zopfli, however, when the same file uses zopfli splitting (2 blocks in this case) then the size produced is smaller than kzip with random tries on one block (on 2 blocks kzip was bigger than kzip with 1 block). Maybe add ability for zopfli to try checking if splitting recompressed block to smaller ones will produce better results (usually zopfli block splitting module provides enough information that in most cases assumes correctly that the size would be smaller if more blocks are involved). I may also think about adding such ability to my zopfli mod to pass additional switch when custom block split points are passed for zopfli to try checking if each custom block split range may be more optimal if additional split point is injected...
    Last edited by Mr_KrzYch00; 30th May 2015 at 02:32.

  4. #3
    Member
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    168
    Thanks
    163
    Thanked 9 Times in 8 Posts
    Prompt, whether it is possible to do the opposite.
    For example, I have an image png optimized zopfli, I optimizes the image by pngout (-ks -f6). How to make Huffmix worked at it?

  5. #4
    Member
    Join Date
    Jul 2014
    Location
    Mars
    Posts
    164
    Thanks
    115
    Thanked 10 Times in 9 Posts
    src code? if no, -Ofast /arch:AVX -mfpmath=sse -DWINDOWS -fwhole-program -fomit-frame-pointer -fno-rtti would be great to test
    Last edited by necros; 31st January 2016 at 05:42.

  6. #5
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    856
    Thanks
    45
    Thanked 104 Times in 82 Posts
    nice work caveman

    did you ever fix the option to copy smalles files it huffmix couldt merge two files due to blocksize difference?

  7. #6
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    856
    Thanks
    45
    Thanked 104 Times in 82 Posts
    just a quick feedback
    this is a ,png file that has been ran through pngwolf. then pngout all filters. then pngout all block size tresholds. then 99 pngout /r trials mixed with huffmix. theb defluff and deflopt and huffmixexe once more

    Code:
    oots1021.png (939x1194 24bits - comic)
    preoptimized  454 KB (465,887 bytes)
    Rezoped       457 KB (468,540 bytes)  
    Mix of both   454 KB (465,869 bytes)
    Very nice even after all those optimization rezop is able to squeeze down some blocks, evem thougj the total size is bigger.
    just once again hsow the huge benefits of huffmix as well.



    Feedback 2:
    just ran rezop on 1015 png files. then i tried redoing deflopt on them and 996 of the 1015 files was rewritten. so deflopt needs to be run after rezop. ( and probalby defluff as well)



    Feedback 3
    Preoptimized 141 MB (148,809,589 bytes)
    rezop+deflopt 142 MB (149,136,315 bytes)
    huffmixed 141 MB (148,720,022 bytes)
    Last edited by SvenBent; 3rd February 2016 at 03:50.

  8. #7
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    856
    Thanks
    45
    Thanked 104 Times in 82 Posts
    just a quick feedback
    this is a ,png file that has been ran through pngwolf. then pngout all filters. then pngout all block size tresholds. then 99 pngout /r trials mixed with huffmix. theb defluff and deflopt and huffmixexe once more

    Code:
    oots1021.png (939x1194 24bits - comic)
    preoptimized  454 KB (465,887 bytes)
    Rezoped       457 KB (468,540 bytes)  
    Mix of both   454 KB (465,869 bytes)
    Very nice even after all those optimization rezop is able to squeeze down some blocks, evem thougj the total size is bigger.
    just once again hsow the huge benefits of huffmix as well.

Similar Threads

  1. Zopfli & ZopfliPNG KrzYmod
    By Mr_KrzYch00 in forum Data Compression
    Replies: 81
    Last Post: 18th February 2018, 00:15
  2. pngout vs pngwolf-zopfli
    By SvenBent in forum Data Compression
    Replies: 77
    Last Post: 31st July 2016, 20:28
  3. Google: Compress Data More Densely with Zopfli
    By roytam1 in forum Data Compression
    Replies: 64
    Last Post: 9th July 2016, 00:09
  4. deflate, zopfli, lzma intergers og float heavy ?
    By SvenBent in forum The Off-Topic Lounge
    Replies: 2
    Last Post: 23rd September 2015, 15:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •