I am populating network data buffer for sockets send() call.
Initially i know buffer maximumSize, and (after populating it) i know finalSize <= maximumSize.
I feel convenient having possibility to shrink such a buffer, making it smaller, leaving data as is.
1) I want use container, storing the size along (like std::vector< char > or std::string)
2) There is no need to memset allocated buffer bytes to zero or any other known value.
I want to satisfy 1 and 2. What container can you advise me and why?