diffusion
Version:
Diffusion JavaScript client
28 lines (27 loc) • 768 B
JavaScript
;
/**
* @module diffusion.datatypes
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BufferSlice = void 0;
/**
* A class representing a slice of a buffer
*/
var BufferSlice = /** @class */ (function () {
/**
* Create a new buffer slice
*
* @param buffer the internal buffer
* @param offset the offset of the slice
* @param length the number of bytes in the slice
*/
function BufferSlice(buffer, offset, length) {
if (offset === void 0) { offset = 0; }
if (length === void 0) { length = buffer.length; }
this.$buffer = buffer;
this.$offset = offset;
this.$length = length;
}
return BufferSlice;
}());
exports.BufferSlice = BufferSlice;