示例#1
0
        public void UpdateState(ref FseBitReader reader)
        {
            FseDecompressTable dInfo = Table[State];
            uint lowBits             = reader.ReadBits(dInfo.NumberOfBits);

            State = (int)(dInfo.NewState + lowBits);
        }
示例#2
0
        public byte DecodeSymbol(ref FseBitReader reader)
        {
            FseDecompressTable dInfo = Table[State];
            uint lowBits             = reader.ReadBits(dInfo.NumberOfBits);

            State = (int)(dInfo.NewState + lowBits);
            return(dInfo.Symbol);
        }
示例#3
0
        public static FseDecompressState Initialize(ref FseBitReader reader, FseDecompressTableHeader header, ReadOnlySpan <FseDecompressTable> dt)
        {
            FseDecompressState fse = default;

            fse.Table = dt;
            fse.State = (int)reader.ReadBits(header.TableLog);
            return(fse);
        }