(buf []byte)
| 11 | ) |
| 12 | |
| 13 | func encode(buf []byte) string { |
| 14 | var b bytes.Buffer |
| 15 | defer b.Reset() |
| 16 | |
| 17 | w := zlib.NewWriter(&b) |
| 18 | if _, err := w.Write(buf); err != nil { |
| 19 | return "" |
| 20 | } |
| 21 | w.Close() |
| 22 | |
| 23 | return hex.EncodeToString(b.Bytes()) |
| 24 | } |
| 25 | |
| 26 | func decode(d string) []byte { |
| 27 | hr, err := hex.DecodeString(d) |
searching dependent graphs…