Encode serializes an arbitrary data type in a program, which, when executed, produces that data.
(v Data)
| 103 | // Encode serializes an arbitrary data type in a program, |
| 104 | // which, when executed, produces that data. |
| 105 | func Encode(v Data) []byte { |
| 106 | var b bytes.Buffer |
| 107 | v.encode(&b) |
| 108 | return b.Bytes() |
| 109 | } |
| 110 | |
| 111 | func writePushdata(buf *bytes.Buffer, data []byte) { |
| 112 | op := uint64(len(data)) + op.MinPushdata |
no test coverage detected