7namespace Stroika::Foundation::Streams {
14 template <
typename ELEMENT_TYPE>
17 CopyAll_Buffered<ELEMENT_TYPE> (from, to, bufferSize);
25 template <
typename ELEMENT_TYPE>
36 template <
typename ELEMENT_TYPE>
40 while (
size_t n = from.
ReadBlocking (span{buf}).size ()) {
41 Assert (n <= buf.size ());
42 to.
Write (span{buf.begin (), n});
void CopyAll_Buffered(typename InputStream::Ptr< ELEMENT_TYPE > from, typename OutputStream::Ptr< ELEMENT_TYPE > to, size_t bufferSize=10 *1024)
Copy the contents of stream 'from' to stream 'to', by reading a chunk at a time - tends to do multipl...
void CopyAll_OneRead(typename InputStream::Ptr< ELEMENT_TYPE > from, typename OutputStream::Ptr< ELEMENT_TYPE > to)
Copy the contents of stream 'from' to stream 'to', by reading ALL of from into memory at once,...
void CopyAll(typename InputStream::Ptr< ELEMENT_TYPE > from, typename OutputStream::Ptr< ELEMENT_TYPE > to, size_t bufferSize=10 *1024)
Copy the contents of stream 'from' to stream 'to'.
Logically halfway between std::array and std::vector; Smart 'direct memory array' - which when needed...
OutputStream<>::Ptr is Smart pointer to a stream-based sink of data.
nonvirtual void Write(span< ELEMENT_TYPE2, EXTENT_2 > elts) const
void CheckForInterruption()