Wrote a BufferHelper function for "expanding" a buffer.