#define __RDR_OUTSTREAM_H__
#include <rdr/types.h>
+#include <rdr/InStream.h>
#include <string.h> // for memcpy
namespace rdr {
}
}
+ // copyBytes() efficiently transfers data between streams
+
+ void copyBytes(InStream* is, int length) {
+ while (length > 0) {
+ int n = check(1, length);
+ is->readBytes(ptr, n);
+ ptr += n;
+ length -= n;
+ }
+ }
+
// writeOpaqueN() writes a quantity without byte-swapping.
inline void writeOpaque8( U8 u) { writeU8(u); }