natix.CompactDS.OctetStream.Read C# (CSharp) Метод

Read() публичный Метод

Read the current value at Position, then increments ctx.Offset
public Read ( Context ctx ) : byte
ctx Context
Результат byte
        public byte Read(Context ctx)
        {
            var v = this.buff [ctx.Offset];
            ++ctx.Offset;
            return v;
        }

Usage Example

Пример #1
0
 public long Decode(OctetStream reader, OctetStream.Context ctx)
 {
     long d = 0;
     int p = 0;
     while (true) {
         long m = reader.Read (ctx);
         d |= (m & 127) << p;
         if ((m & 128) != 0) {
             break;
         }
         p += 7;
     }
     return d;
 }