public static void writeVarInt32(final OutputStream output,int value) throws IOException {
  while (true) {
    if ((value & ~0x7F) == 0) {
      output.write(value);
      return;
    }
    output.write((value & 0x7F) | 0x80);
    value>>>=7;
  }
}

public static void writeVarInt32 ( final OutputStream output , int value ) throws IOException { while ( true ) { if ( ( value & ~ 0x7F ) == 0 ) { output . write ( value ) ; return ; } output . write ( ( value & 0x7F ) | 0x80 ) ; value >>>= 7 ; } }
write a varint ; value is treated as an unsigned value .
