code: static public void packInt(DataOutput out, int value) throws IOException {
         // Optimize for the common case where value is small. This is particular important where our caller
         // is SerializerBase.SER_STRING.serialize because most chars will be ASCII characters and hence in this range.
         // credit Max Bolingbroke https://github.com/jankotek/MapDB/pull/489
  
          int shift = (value & ~0x7F); //reuse variable
          if (shift != 0) {
              //$DELAY$
              shift = 31-Integer.numberOfLeadingZeros(value);
              shift -= shift%7; // round down to nearest multiple of 7
              while(shift!=0){
                  out.writeByte((byte) ((value>>>shift) & 0x7F));
                  //$DELAY$
                  shift-=7;
              }
          }
          //$DELAY$
          out.writeByte((byte) ((value & 0x7F)|0x80));
      }
docs: Pack int into an output stream.
  It will occupy 1-5 bytes depending on value (lower values occupy smaller space)
  
  @param out DataOutput to put value into
  @param value to be serialized, must be non-negative
  @throws java.io.IOException in case of IO error