Hi @maxime,
Thanks for contributing this library, and for linking to it in your answer on StackOverflow. That answer was deleted on the grounds of SO's policy requiring more explanation than simply a link to the solution, but I managed to get it undeleted.
To satisfy SO policies though, would you be able to edit your answer and explain a bit more about how it works?
Thanks,
Dan