docs: function extractSteim2Samples(dataView: DataView, offset: number, swapBytes: boolean) :Int32Array {
    /* get nibbles */
    let nibbles = dataView.getUint32(offset, swapBytes);
    let currNibble = 0;
    let dnib = 0;
    let temp = new Int32Array(106); //max 106 = 7 samples * 15 long words + 1 nibble int
    let tempInt;
    let currNum = 0;
    let diffCount = 0;  // number of differences
    let bitSize = 0;    // bit size
    let headerSize = 0; // number of header/unused bits at top
    for (let i=0; i<16; i++) {
      currNibble = (nibbles >> (30 - i*2 ) ) & 0x03;
      switch (currNibble) {
        case 0:
          //System.out.println("0 means header info");
          // only include header info if offset is 0
          if (offset == 0) {
            temp[currNum++] = dataView.getInt32(offset+(i*4), swapBytes);
          }
          break;
        case 1:
          //console.log("1 means 4 one byte differences " +currNum+" "+dataView.getInt8(offset+(i*4))+" "+dataView.getInt8(offset+(i*4)+1)+" "+dataView.getInt8(offset+(i*4)+2)+" "+dataView.getInt8(offset+(i*4)+3));
          temp[currNum++] = dataView.getInt8(offset+(i*4));
          temp[currNum++] = dataView.getInt8(offset+(i*4)+1);
          temp[currNum++] = dataView.getInt8(offset+(i*4)+2);
          temp[currNum++] = dataView.getInt8(offset+(i*4)+3);
          break;
        case 2:
          tempInt = dataView.getUint32(offset+(i*4), swapBytes);
          dnib = (tempInt >> 30) & 0x03;
          switch (dnib) {
            case 1:
              //console.log("2,1 means 1 thirty bit difference");
              temp[currNum++] = (tempInt << 2) >> 2;
              break;
            case 2:
              //console.log("2,2 means 2 fifteen bit differences");
              temp[currNum++] = (tempInt << 2) >> 17;  // d0
              temp[currNum++] = (tempInt << 17) >> 17; // d1
              break;
            case 3:
              //console.log("2,3 means 3 ten bit differences");
              temp[currNum++] = (tempInt << 2) >> 22;  // d0
              temp[currNum++] = (tempInt << 12) >> 22; // d1
              temp[currNum++] = (tempInt << 22) >> 22; // d2
              break;
            default:
              //console.log("default");
        }
        break;
      case 3:
        tempInt = dataView.getUint32(offset+(i*4), swapBytes);
        dnib = (tempInt >> 30) & 0x03;
        // for case 3, we are going to use a for-loop formulation that
        // accomplishes the same thing as case 2, just less verbose.
        diffCount = 0;  // number of differences
        bitSize = 0;    // bit size
        headerSize = 0; // number of header/unused bits at top
        switch (dnib) {
          case 0:
            //System.out.println("3,0 means 5 six bit differences");
            headerSize = 2;
            diffCount = 5;
            bitSize = 6;
            break;
          case 1:
            //System.out.println("3,1 means 6 five bit differences");
            headerSize = 2;
            diffCount = 6;
            bitSize = 5;
            break;
          case 2:
            //System.out.println("3,2 means 7 four bit differences, with 2 unused bits");
            headerSize = 4;
            diffCount = 7;
            bitSize = 4;
            break;
          default:
            //System.out.println("default");
        }
        if (diffCount > 0) {
          for (let d=0; d<diffCount; d++) {  // for-loop formulation
            temp[currNum++] = ( tempInt << (headerSize+(d*bitSize)) ) >> (((diffCount-1)*bitSize) + headerSize);
          }
        }
      }
    }
    let out = new Int32Array(currNum);
    for(let i=0; i<currNum; i++) {
      out[i] = temp[i];
    }
    return out;
  }