Support writing binary buffers