DemoRec: access streambuffer directly