Simple implementation of the Raptor algorithm