This commit is contained in:
2025-08-27 11:58:01 -07:00
parent f24d21033a
commit f4b9f350ae
25 changed files with 2184 additions and 485 deletions

21
internal/fit/validator.go Normal file
View File

@@ -0,0 +1,21 @@
package fit
// Validate performs basic validation of FIT file structure
func Validate(data []byte) bool {
// Minimum FIT file size is 14 bytes (header)
if len(data) < 14 {
return false
}
// Check magic number: ".FIT"
if string(data[8:12]) != ".FIT" {
return false
}
return true
}
// MinFileSize returns the minimum size of a valid FIT file
func MinFileSize() int {
return 14
}