Set prebuf to the expected buffer size