コード例 #1
0
    /// <summary>
    /// Skip the next varint length prefixed bytes.
    /// Alternative to ReadBytes when the data is not of interest.
    /// </summary>
    public static void SkipBytes(CitoStream stream)
    {
        int length = ReadUInt32(stream);

        if (stream.CanSeek())
        {
            stream.Seek(length, CitoSeekOrigin.Current);
        }
        else
        {
            ReadBytes(stream);
        }
    }
コード例 #2
0
 /// <summary>
 /// Skip the next varint length prefixed bytes.
 /// Alternative to ReadBytes when the data is not of interest.
 /// </summary>
 public static void SkipBytes(CitoStream stream)
 {
     int length = ReadUInt32(stream);
     if (stream.CanSeek())
         stream.Seek(length, CitoSeekOrigin.Current);
     else
         ReadBytes(stream);
 }