membuf is an auto-enlarging continuous in-memory buffer. it also has inline-buffer to use stack memory efficiently.