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

Method ReadBigInt

ecgo/utils/buf.go:97–105  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

95}
96
97func (i *InputBuf) ReadBigInt(n int) *big.Int {
98 zbuf := make([]byte, n)
99 for j := 0; j < n; j++ {
100 zbuf[j] = i.buf[n-1-j]
101 }
102 x := new(big.Int).SetBytes(zbuf)
103 i.buf = i.buf[n:]
104 return x
105}
106
107func (i *InputBuf) ReadFieldElement(field SimpleField) constraint.Element {
108 return field.FromInterface(i.ReadBigInt(field.SerializedLen()))

Callers 4

ReadFieldElementMethod · 0.95
DeserializeRootCircuitFunction · 0.95
DetectFieldIdFromFileFunction · 0.95
deserializeCoefFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected