Write writes the binary representation of data into w, using BigEndian order https://golang.org/pkg/encoding/binary/#Write
(w io.Writer, data ...interface{})
| 8 | // Write writes the binary representation of data into w, using BigEndian order |
| 9 | // https://golang.org/pkg/encoding/binary/#Write |
| 10 | func Write(w io.Writer, data ...interface{}) error { |
| 11 | for _, v := range data { |
| 12 | if err := binary.Write(w, binary.BigEndian, v); err != nil { |
| 13 | return err |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | return nil |
| 18 | } |
| 19 | |
| 20 | func WriteVariableWidthInt(w io.Writer, n int64) error { |
| 21 | buf := []byte{byte(n & 0x7f)} |
searching dependent graphs…