Is there a script for IPO decimation / keyframe reduction?

I’m looking for a script to reduce the points on an IPO while still keeping its shape. Is there a script that can do that? I’ve searched and found nothing.

I’d like to use this on baked actions in the game engine since it runs much faster with fewer keyframes.

Thanks

I think Ipo window need more tools like this you said, curve smoothig or apply noise, to name someones.