New API: NewReaderFromBuf.