Make buffer size adaptively smaller
Make buffer size adaptively smaller

First part of #9

rschiefer/templating,seancpeters/templating,lambdakris/templating,mlorbetske/templating,seancpeters/templating,lambdakris/templating,seancpeters/templating,rschiefer/templating,danroth27/templating,danroth27/templating,seancpeters/templating,mlorbetske/templating,rschiefer/templating,danroth27/templating,lambdakris/templating