zad 02,03 #37

Closed
s426159 wants to merge 14 commits from s426159/DALGLI0:master into master
Showing only changes of commit a698eefa97 - Show all commits

View File

@ -7,12 +7,12 @@ switch (flag) {
break;
case '-d':
let fcs = JSON.parse(process.argv[4].replace(/'/g, '"'));
console.log(crc.decode(message, fcs));
break;
case '-t':
let res = crc.encode(message);
console.log(res.encoded);
console.log(crc.decode(message, res.FCS))
break;
default:
throw "incorect flag"