Fork of HPPC, originally from Carrot Search: