code: public void write_uv(int w) throws IOException {
  		if(w < 0) {
  			throw new IllegalArgumentException("cannot write negative number in a variable amount of space");
  		}
  		do {
  			int t = w & 7;
  			w = w >> 3;
  			if(w != 0) {
  				write_un(8|t,4);
  			} else {
  				write_un(t,4);
  			}
  		} while(w != 0);
  	}
docs: Write an unsigned integer value using a variable amount of space. The
  value is split into 4 bit (big-endian) chunks, where the msb of each
  chunk is a flag indicating whether there are more chunks. Therefore,
  values between 0 and 7 fit into 4 bits. Similarly, values between 8 and
  63 fit into 8 bits, etc
  
  @param w
  --- number to convert (which cannot be negative)
  @throws IOException