24 lines
294 B
Go
24 lines
294 B
Go
package main
|
|
|
|
type SFSData struct {
|
|
length uint8
|
|
}
|
|
|
|
func NewSFSFromBytes(data []byte) *SFSData {
|
|
return &SFSData{
|
|
length: data[0],
|
|
}
|
|
}
|
|
|
|
func NewSFS(length uint8) *SFSData {
|
|
return &SFSData{
|
|
length: length,
|
|
}
|
|
}
|
|
|
|
func (sfs *SFSData) ToBytes() []byte {
|
|
return []byte{
|
|
sfs.length,
|
|
}
|
|
}
|