Esempio n. 1
0
        /// <summary>
        /// Reads an encoded value from a <see cref="BitReader"/>.
        /// </summary>
        public int Read(BitReader reader)
        {
            var u = Codes.UnaryZeros.Read(reader) - 1;

            return((int)reader.Read(u) | (1 << u));
        }
Esempio n. 2
0
        /// <summary>
        /// Reads an encoded value from a <see cref="BitReader"/>.
        /// </summary>
        public int Read(BitReader reader)
        {
            int u = Codes.UnaryOnes.Read(reader) - 1;

            return((int)reader.Read(exponentOf2) + (u << exponentOf2));
        }
Esempio n. 3
0
 /// <summary>
 /// Gets the value corresponding to a code.
 /// </summary>
 public int Read(BitReader reader)
 {
     return((int)reader.Read(bitCount));
 }
Esempio n. 4
0
 /// <summary>
 /// Gets the value corresponding to a code.
 /// </summary>
 public int Read(BitReader reader)
 {
 }