New Trie iterator

This commit is contained in:
obscuren
2014-05-27 01:08:51 +02:00
parent 4c7bd75c1a
commit 5cdfee5143
3 changed files with 71 additions and 12 deletions

View File

@@ -59,3 +59,18 @@ func CompactHexDecode(str string) []int {
return hexSlice
}
func DecodeCompact(key []int) string {
base := "0123456789abcdef"
var str string
for _, v := range key {
if v < 16 {
str += string(base[v])
}
}
res, _ := hex.DecodeString(str)
return string(res)
}