示例#1
0
 public long Decode(OctetReader reader)
 {
     long d = 0;
     for (int i = (this.numoctets-1) * 8; i >= 0; i-=8) {
         long u = reader.Read ();
         d |= u << i;
     }
     return d;
 }
示例#2
0
 public long Decode(OctetReader reader)
 {
     long d = 0;
     int p = 0;
     while (true) {
         long m = reader.Read ();
         d |= (m & 127) << p;
         if ((m & 128) == 128) {
             break;
         }
         p += 7;
     }
     return d;
 }