A better PNG minifier

over 5 years ago from Ivan Kutskir, Programmer

  • Ivan KutskirIvan Kutskir, over 5 years ago

    That is truly amazing! I guess the 15.1 kB version was made by trying different orderings of palette and different filtering options. I could do that in 6 lines of code, but this part would take too much time ...

    How long did it take? I guess it was more than 50 milliseconds.

    0 points
    • Vlad Danilov, over 5 years ago

      It is time consuming, takes seconds. You need all the performance you have.

      Type trials, palette sorting, filter brute forcing, nearly-optimal Deflate compression, etc. It's way more than 6 lines of code to do it properly.

      With bit-optimal parsing and elaborate heuristics you can probably get close and keep top performance.

      0 points