static int writeVarLong(OutputStream out,long x) throws IOException {
  int len=0;
  while ((x & ~0x7f) != 0) {
    out.write((byte)(0x80 | (x & 0x7f)));
    x>>>=7;
    len++;
  }
  out.write((byte)x);
  return ++len;
}

static int writeVarLong ( OutputStream out , long x ) throws IOException { int len = 0 ; while ( ( x & ~ 0x7f ) != 0 ) { out . write ( ( byte ) ( 0x80 | ( x & 0x7f ) ) ) ; x >>>= 7 ; len ++ ; } out . write ( ( byte ) x ) ; return ++ len ; }
write a variable size long value .
