MCPcopy
hub / github.com/klauspost/compress / mustReadFrom

Method mustReadFrom

zstd/fse_decoder.go:186–207  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

184}
185
186func (s *fseDecoder) mustReadFrom(r io.Reader) {
187 fatalErr := func(err error) {
188 if err != nil {
189 panic(err)
190 }
191 }
192 // dt [maxTablesize]decSymbol // Decompression table.
193 // symbolLen uint16 // Length of active part of the symbol table.
194 // actualTableLog uint8 // Selected tablelog.
195 // maxBits uint8 // Maximum number of additional bits
196 // // used for table creation to avoid allocations.
197 // stateTable [256]uint16
198 // norm [maxSymbolValue + 1]int16
199 // preDefined bool
200 fatalErr(binary.Read(r, binary.LittleEndian, &s.dt))
201 fatalErr(binary.Read(r, binary.LittleEndian, &s.symbolLen))
202 fatalErr(binary.Read(r, binary.LittleEndian, &s.actualTableLog))
203 fatalErr(binary.Read(r, binary.LittleEndian, &s.maxBits))
204 fatalErr(binary.Read(r, binary.LittleEndian, &s.stateTable))
205 fatalErr(binary.Read(r, binary.LittleEndian, &s.norm))
206 fatalErr(binary.Read(r, binary.LittleEndian, &s.preDefined))
207}
208
209// decSymbol contains information about a state entry,
210// Including the state offset base, the output symbol and

Callers 1

readDecodersFunction · 0.80

Calls 1

ReadMethod · 0.45

Tested by 1

readDecodersFunction · 0.64