Sorry for the late reply. I had to deal with stuff.
serhiy.storchaka:
> What tools did you use, optipng, advpng, pngcrush, pngnq, pngquant, or other? How much space is saved?
I had half a crate of whiskey that day so I'm going to say optipng and pngcrush were used and if my recollection is good the saved space was ≈ 5 to 50 % depending on the file.
> Note that some tools remove an information about palette that makes files displaying differently on different platforms and output devises.
I am aware of that. But if I understood correctly these files are rendered in documentation, and I don't think they're going to do this in a PlayStation 2. There may be complaints with Windows XP users because I remember for sure that optimized PNG files could not render very well back in those days.
haypo:
> I suggest to work on Sphinx to propose to implement this optimization on the HTML rendering, maybe with optional external tools. What do you think?
Like you I'm very fond of a long-term proper solution and that is, by the way, the solution you deserve.
Unfortunately, I do not have the skills for provide that. I can only give the solution you need (which is smaller files).