constructor(url) {
    this.initString = url;

    var colon = url.substring(0,15).indexOf(":");
    if ( colon != -1) {
      this.scheme = url.substring(0,colon);
      if (schemeMappings[this.scheme]) {
        url = `data:${schemeMappings[this.scheme]},${url}`
      }
    } else {
      if (url.charAt(0) == "?") {
        this.editable = true;
        url = url.substring(1);
      }

      this.dataPrefix = HEAD_TAGS_EXTENDED();
      // todo: gzip starts with 0x1f8b
      let encoding = url.startsWith("XQA") ? bitty.LZMA_MARKER : bitty.GZIP_MARKER;
      url = `data:text/html;charset=utf-8;format=${encoding};base64,${url}`;
    }
    
    let match = url.match(dataUrlRE);

    this.params = {};
    
    if (match) {
      let info = match.groups;
      Object.assign(this, info);  
      this.params = info.params ? JSON.parse('{"' + decodeURI(info.params?.substring(1)).replace(/"/g, '\\"').replace(/;/g, '","').replace(/=/g,'":"') + '"}') : {};
    }
    if (this.encoding) {
      this.data = this.data.replace(/=/g,"");
    } else {
      this.data = decodeURIComponent(this.data);
    }
  }
@constructor
@param {URL} url - data url