コード例 #1
0
        /// <summary>
        /// Read first value from a byte array.
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static UInt64 ReadOneDefault(Byte[] input)
        {
            if (null == input)
            {
                throw new ArgumentNullException(nameof(input));
            }

            using (var stream = new MemoryStream(input)) {
                using (var reader = new EliasDeltaUnsignedReader(stream)) {
                    return(reader.Read());
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Read the next value.
 /// </summary>
 /// <returns></returns>
 public Int64 Read()
 {
     return(ZigZag.Decode(Underlying.Read()));
 }