use a circular ring buffer for efficiency; unsnap uses rbuf internally now.