- ubyte[] toBytes();
-
Convert to array of bytes.
- void reserve(uint nbytes);
-
Preallocate nbytes more to the size of the internal buffer.
This is a
speed optimization, a good guess at the maximum size of the resulting
buffer will improve performance by eliminating reallocations and copying.
- void write(ubyte[] bytes);
void write(ubyte b);
void write(byte b);
void write(char c);
void write(ushort w);
void write(short s);
void write(wchar c);
void write(uint w);
void write(int i);
void write(ulong l);
void write(long l);
void write(float f);
void write(double f);
void write(real f);
void write(char[] s);
void write(OutBuffer buf);
-
Append data to the internal buffer.
- void fill0(uint nbytes);
-
Append nbytes of 0 to the internal buffer.
- void alignSize(uint alignsize);
-
0-fill to align on power of 2 boundary.
- void align2();
-
Optimize common special case alignSize(2)
- void align4();
-
Optimize common special case alignSize(4)
- char[] toString();
-
Convert internal buffer to array of chars.
- void vprintf(char[] format,void* args);
-
Append output of C's vprintf() to internal buffer.
- void printf(char[] format,...);
-
Append output of C's printf() to internal buffer.
- void spread(uint index,uint nbytes);
-
At offset index into buffer, create nbytes of space by shifting upwards
all data past index.