break the io.Write API and use a BytesCloser instead so we can use buffers of memory and do less allocations