add downloadBuffer API

closes #48