/**
 * 二进制字符串转JSON字符串
 * */
export function binaryToStr(binaryStr = '') {
  let res = '';
  if (binaryStr) {
    binaryStr = binaryStr.replaceAll('.', '1');
    binaryStr = binaryStr.replaceAll('-', '0');
    let strListArr = binaryStr.split('_');

    for (let i = 0; i < strListArr.length; i++) {
      let item = strListArr[i];
      res += String.fromCharCode(parseInt(item, 2));
    }
  }
  return res;
}
