Creates a buffer from an array of data. The chunk size is set to the size of array.
t { Buffer buffer = new Buffer(cast(ubyte[])[1, 2, 3, 4]); assert(buffer.index == 0); assert(buffer.length == 4); buffer = new Buffer([1, 2]); assert(buffer.index == 0); assert(buffer.length == 8);
See Implementation
Creates a buffer from an array of data. The chunk size is set to the size of array.