Gazebo_simulation-Frontend/node_modules/str2buf/node/str2buf.mjs
2020-12-21 10:29:31 -05:00

19 lines
455 B
JavaScript

function fromUint8Array(uint8Array) {
return new Buffer(uint8Array).toString('binary');
}
function toUint8Array(binaryStr) {
return new Uint8Array(Buffer.from(binaryStr, 'binary'));
}
function fromBuffer(buffer) {
return fromUint8Array(new Uint8Array(buffer));
}
function toBuffer(binaryStr) {
return toUint8Array(binaryStr).buffer;
}
export { fromUint8Array, toUint8Array, fromBuffer, toBuffer };
//# sourceMappingURL=str2buf.mjs.map