"Extract till you drop" by Matthias Verraes, ported to C#