• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/contrib/zstd/doc/educational_decoder/

Lines Matching defs:symbols

139 // Limit the maximum number of symbols to 256 so we can store a symbol in a byte
144 u8 *symbols;
191 // Limit the maximum number of symbols so they can be stored in a single byte
196 u8 *symbols;
880 if (!ctx->literals_dtable.symbols) {
1081 // "The Sequences_Section regroup all symbols required to decode commands.
1165 // Decode symbols, but don't update states
1248 if (!table->symbols) {
1737 const u8 symb = dtable->symbols[*state];
1788 // "The process continues up to reading the required number of symbols per
1793 // When all symbols have been decoded, the final state value shouldn't have
1836 /// Codes within a level are allocated in symbol order (i.e. smaller symbols get
1842 ERROR("Too many symbols for Huffman");
1849 // Count the number of symbols for each number of bits, and determine the
1861 table->symbols = malloc(table_size);
1864 if (!table->symbols || !table->num_bits) {
1865 free(table->symbols);
1870 // "Symbols are sorted by Weight. Within same Weight, symbols keep natural
1896 memset(&table->symbols[code], i, len);
1907 ERROR("Too many symbols for Huffman");
1944 free(dtable->symbols);
1959 dst->symbols = malloc(size);
1961 if (!dst->symbols || !dst->num_bits) {
1965 memcpy(dst->symbols, src->symbols, size);
1977 return dtable->symbols[state];
2029 // "The first state (State1) encodes the even indexed symbols, and the
2041 // "The number of symbols to decode is determined by tracking bitStream
2044 // bits are 0. Then, the symbols for each of the final states are
2075 ERROR("Too many symbols for FSE");
2081 dtable->symbols = malloc(size * sizeof(u8));
2085 if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) {
2091 // Needs to be u16 because max value is 2 * max number of symbols,
2097 // single cell, starting from the end of the table. These symbols define a
2101 // Scan for low probability symbols to put at the top
2103 dtable->symbols[--high_threshold] = s;
2108 // "All remaining symbols are sorted in their natural order. Starting from
2124 dtable->symbols[pos] = s;
2142 u8 symbol = dtable->symbols[i];
2158 // "An FSE distribution table describes the probabilities of all symbols
2260 dtable->symbols = malloc(sizeof(u8));
2264 if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) {
2270 dtable->symbols[0] = symb;
2277 free(dtable->symbols);
2292 dst->symbols = malloc(size);
2295 if (!dst->symbols || !dst->num_bits || !dst->new_state_base) {
2299 memcpy(dst->symbols, src->symbols, size);