1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-07-19 04:24:04 +00:00

Add NewSector function

This commit is contained in:
2025-06-22 20:08:53 +02:00
parent 4ab7f0a588
commit c08c429b99
5 changed files with 71 additions and 9 deletions

View File

@ -79,23 +79,23 @@ func (sect *FmpSector) processChunks(dict *FmpDict) error {
}
case FmpChunkSimpleData:
dict.SetValue(currentPath, chunk.Value)
dict.set(currentPath, chunk.Value)
case FmpChunkSegmentedData:
// Todo: take index into account
dict.SetValue(
dict.set(
currentPath,
append(dict.GetValue(currentPath...), chunk.Value...),
)
case FmpChunkSimpleKeyValue:
dict.SetValue(
dict.set(
append(currentPath, uint64(chunk.Key)),
chunk.Value,
)
case FmpChunkLongKeyValue:
dict.SetValue(
dict.set(
append(currentPath, uint64(chunk.Key)), // todo: ??
chunk.Value,
)