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

Chunk parsing (WIP)

This commit is contained in:
2025-06-11 21:52:52 +02:00
parent d8f75521b2
commit ed56c54e68
5 changed files with 335 additions and 40 deletions

View File

@ -1,5 +1,28 @@
package fmp
type FmpError string
type FmpChunkType uint8
func (e FmpError) Error() string { return string(e) }
var (
ErrRead = FmpError("read error")
ErrBadMagic = FmpError("bad magic number")
ErrBadHeader = FmpError("bad header")
ErrUnsupportedCharset = FmpError("unsupported character set")
ErrBadSectorCount = FmpError("bad sector count")
)
const (
FMP_CHUNK_SIMPLE_DATA FmpChunkType = iota
FMP_CHUNK_SEGMENTED_DATA
FMP_CHUNK_SIMPLE_KEY_VALUE
FMP_CHUNK_LONG_KEY_VALUE
FMP_CHUNK_PATH_PUSH
FMP_CHUNK_PATH_POP
FMP_CHUNK_NOOP
)
const (
FMP_COLLATION_ENGLISH = 0x00
FMP_COLLATION_FRENCH = 0x01