Custom Buffer for streaming writes

Allow usage of custom buffer for streaming writes, for example a custom encoding.