(o *utils.OutputBuf, bnlen int, coef *big.Int, coefType uint8, publicInputId uint64)
| 11 | const MAGIC = 3914834606642317635 |
| 12 | |
| 13 | func serializeCoef(o *utils.OutputBuf, bnlen int, coef *big.Int, coefType uint8, publicInputId uint64) { |
| 14 | if coefType == 1 { |
| 15 | o.AppendUint8(1) |
| 16 | o.AppendBigInt(bnlen, coef) |
| 17 | } else if coefType == 2 { |
| 18 | o.AppendUint8(2) |
| 19 | } else { |
| 20 | o.AppendUint8(3) |
| 21 | o.AppendUint64(publicInputId) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func deserializeCoef(in *utils.InputBuf, bnlen int) (*big.Int, uint8, uint64) { |
| 26 | coefType := in.ReadUint8() |
no test coverage detected