(w io.Writer, n int64)
| 18 | } |
| 19 | |
| 20 | func WriteVariableWidthInt(w io.Writer, n int64) error { |
| 21 | buf := []byte{byte(n & 0x7f)} |
| 22 | n >>= 7 |
| 23 | for n != 0 { |
| 24 | n-- |
| 25 | buf = append([]byte{0x80 | (byte(n & 0x7f))}, buf...) |
| 26 | n >>= 7 |
| 27 | } |
| 28 | |
| 29 | _, err := w.Write(buf) |
| 30 | |
| 31 | return err |
| 32 | } |
| 33 | |
| 34 | // WriteUint64 writes the binary representation of a uint64 into w, in BigEndian |
| 35 | // order |
searching dependent graphs…