public int PeekSLeb128(long pos, out int size)
{
int ret = 0;
int shift = 0;
byte b;
size = 0;
do {
b = (byte) PeekByte (pos + size);
size++;
ret = ret | ((b & 0x7f) << shift);
shift += 7;
} while ((b & 0x80) == 0x80);
if ((shift < 31) && ((b & 0x40) == 0x40))
ret |= - (1 << shift);
return ret;
}