MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / deserializeCoef

Function deserializeCoef

ecgo/layered/serialize.go:25–34  ·  view source on GitHub ↗
(in *utils.InputBuf, bnlen int)

Source from the content-addressed store, hash-verified

23}
24
25func deserializeCoef(in *utils.InputBuf, bnlen int) (*big.Int, uint8, uint64) {
26 coefType := in.ReadUint8()
27 if coefType == 1 {
28 return in.ReadBigInt(bnlen), 1, 0
29 } else if coefType == 2 {
30 return big.NewInt(0), 2, 0
31 } else {
32 return big.NewInt(0), 3, in.ReadUint64()
33 }
34}
35
36// Serialize converts a RootCircuit into a byte array for storage or transmission.
37func (rc *RootCircuit) Serialize() []byte {

Callers 1

DeserializeRootCircuitFunction · 0.85

Calls 3

ReadUint8Method · 0.80
ReadBigIntMethod · 0.80
ReadUint64Method · 0.80

Tested by

no test coverage detected