Ejemplo n.º 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 VLQUnsignedReader(stream)) {
                    return(reader.Read());
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Instantiate with options.
 /// </summary>
 /// <param name="input"></param>
 /// <param name="packetSize">The number of bits to include in each packet.</param>
 public VLQSignedReader(Stream input, Int32 packetSize)
 {
     Underlying = new VLQUnsignedReader(input, packetSize);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Standard instantiation.
 /// </summary>
 /// <param name="input"></param>
 public VLQSignedReader(Stream input)
 {
     Underlying = new VLQUnsignedReader(input);
 }