import { BinaryFileStream, EncodingEnums } from 'kmk-binary-stream';
const stream = BinaryFileStream.open(filename, EncodingEnums.utf8);
stream.writeByte(255);
stream.writeSByte(-127);
stream.writeInt16(32768);
stream.writeUInt16(65535);
stream.writeInt32(2147483647);
stream.writeUInt32(4294967295);
stream.writeInt64(BigInt(1152921504606846975));
stream.writeUInt64(BigInt(1152921504606846975));
console.log(stream.readByte());
console.log(stream.readSByte());
console.log(stream.readInt16());
console.log(stream.readUInt16());
console.log(stream.readInt32());
console.log(stream.readUInt32());
console.log(stream.readInt64());
console.log(stream.readUInt64());
stream.close();