CF_P2B: done, but need to optimize memory consumption.