1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-07-15 18:54:05 +00:00

Rewrite fmp_chunk.go to use switch, add delayed

This commit is contained in:
2025-06-13 14:44:32 +02:00
parent 41041e124c
commit 88ea33c76e
3 changed files with 187 additions and 212 deletions

View File

@ -31,11 +31,12 @@ type FmpSector struct {
}
type FmpChunk struct {
Type FmpChunkType
Length uint64
Key uint64 // If Type == FMP_CHUNK_SHORT_KEY_VALUE or FMP_CHUNK_LONG_KEY_VALUE
Index uint64 // Segment index, if Type == FMP_CHUNK_SEGMENTED_DATA
Value []byte
Type FmpChunkType
Length uint64
Key uint64 // If Type == FMP_CHUNK_SHORT_KEY_VALUE or FMP_CHUNK_LONG_KEY_VALUE
Index uint64 // Segment index, if Type == FMP_CHUNK_SEGMENTED_DATA
Value []byte
Delayed bool
}
type FmpDict map[uint64]*FmpDictEntry