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

Table parsing (WIP)

This commit is contained in:
2025-06-12 11:44:57 +02:00
parent 43523c458a
commit 8562e1147b
6 changed files with 68 additions and 17 deletions

22
fmp/fmp_util.go Normal file
View File

@ -0,0 +1,22 @@
package fmp
func parseVarUint32(payload []byte) uint32 {
var length uint32
n := len(payload)
if n > 4 {
n = 4 // clamp to max uint32
}
for i := range n {
length <<= 8
length |= uint32(payload[i])
}
return length
}
func decodeByteSeq(payload []byte) string {
result := ""
for i := range payload {
result += string(payload[i] ^ 0x5A)
}
return result
}