1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-06-28 04:25:11 +00:00

Row parsing

This commit is contained in:
2025-06-22 18:43:06 +02:00
parent 7359962d98
commit d22b209ca5
5 changed files with 53 additions and 15 deletions

View File

@ -36,6 +36,14 @@ func (dict *FmpDict) GetValue(path ...uint64) []byte {
return nil
}
func (dict *FmpDict) GetChildren(path ...uint64) *FmpDict {
ent := dict.GetEntry(path...)
if ent != nil {
return ent.Children
}
return &FmpDict{}
}
func (dict *FmpDict) SetValue(path []uint64, value []byte) {
for i, key := range path {
_, ok := (*dict)[key]
@ -61,7 +69,7 @@ func parseVarUint64(payload []byte) uint64 {
return length
}
func decodeByteSeq(payload []byte) string {
func decodeFmpString(payload []byte) string {
result := ""
for i := range payload {
result += string(payload[i] ^ 0x5A)