code: private void writeRun() throws IOException {
          final int lastShadow = this.last;
  
          if (lastShadow < this.allowableBlockSize) {
              final int currentCharShadow = this.currentChar;
              final Data dataShadow = this.data;
              dataShadow.inUse[currentCharShadow] = true;
              final byte ch = (byte) currentCharShadow;
  
              int runLengthShadow = this.runLength;
              this.crc.updateCRC(currentCharShadow, runLengthShadow);
  
              switch (runLengthShadow) {
              case 1:
                  dataShadow.block[lastShadow + 2] = ch;
                  this.last = lastShadow + 1;
                  break;
  
              case 2:
                  dataShadow.block[lastShadow + 2] = ch;
                  dataShadow.block[lastShadow + 3] = ch;
                  this.last = lastShadow + 2;
                  break;
  
              case 3: {
                  final byte[] block = dataShadow.block;
                  block[lastShadow + 2] = ch;
                  block[lastShadow + 3] = ch;
                  block[lastShadow + 4] = ch;
                  this.last = lastShadow + 3;
              }
                  break;
  
              default: {
                  runLengthShadow -= 4;
                  dataShadow.inUse[runLengthShadow] = true;
                  final byte[] block = dataShadow.block;
                  block[lastShadow + 2] = ch;
                  block[lastShadow + 3] = ch;
                  block[lastShadow + 4] = ch;
                  block[lastShadow + 5] = ch;
                  block[lastShadow + 6] = (byte) runLengthShadow;
                  this.last = lastShadow + 5;
              }
                  break;
  
              }
          } else {
              endBlock();
              initBlock();
              writeRun();
          }
      }
docs: Writes the current byte to the buffer, run-length encoding it
  if it has been repeated at least four times (the first step
  RLEs sequences of four identical bytes).
  
  <p>Flushes the current block before writing data if it is
  full.</p>
  
  <p>"write to the buffer" means adding to data.buffer starting
  two steps "after" this.last - initially starting at index 1
  (not 0) - and updating this.last to point to the last index
  written minus 1.</p>