We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85452d2 commit d9b6e1eCopy full SHA for d9b6e1e
zstd/fse_decoder_generic.go
@@ -20,10 +20,9 @@ func (s *fseDecoder) buildDtable() error {
20
if v == -1 {
21
s.dt[highThreshold].setAddBits(uint8(i))
22
highThreshold--
23
- symbolNext[i] = 1
24
- } else {
25
- symbolNext[i] = uint16(v)
+ v = 1
26
}
+ symbolNext[i] = uint16(v)
27
28
29
@@ -35,10 +34,12 @@ func (s *fseDecoder) buildDtable() error {
35
34
for ss, v := range s.norm[:s.symbolLen] {
36
for i := 0; i < int(v); i++ {
37
s.dt[position].setAddBits(uint8(ss))
38
- position = (position + step) & tableMask
39
- for position > highThreshold {
+ for {
40
// lowprob area
41
position = (position + step) & tableMask
+ if position <= highThreshold {
+ break
42
+ }
43
44
45
0 commit comments