예제 #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));
        }
예제 #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));
        }
예제 #3
0
 /// <summary>
 /// Gets the value corresponding to a code.
 /// </summary>
 public int Read(BitReader reader)
 {
     return((int)reader.Read(bitCount));
 }
예제 #4
0
 /// <summary>
 /// Gets the value corresponding to a code.
 /// </summary>
 public int Read(BitReader reader)
 {
 }