+ return (m_stream->m_lastcount = orig_size);
+}
+
+size_t wxStreamBuffer::Write(wxStreamBuffer *sbuf)
+{
+ char buf[BUF_TEMP_SIZE];
+ size_t s = 0, bytes_count = BUF_TEMP_SIZE;
+
+ while (bytes_count == BUF_TEMP_SIZE) {
+ if (m_stream->StreamSize() < bytes_count)
+ bytes_count = m_stream->StreamSize();
+ bytes_count = sbuf->Read(buf, bytes_count);
+ bytes_count = Write(buf, bytes_count);
+ s += bytes_count;
+ }
+ return s;