Would it work if we just return outputByteBuffer? That reduces the amount of temporary objects created.