scrapper / fit4ruby

Fit4Ruby is a Ruby library to read and write FIT files.
GNU General Public License v2.0
26 stars 17 forks source link

Header size 12 byted #4

Closed karl-petter closed 5 years ago

karl-petter commented 8 years ago

According to section 3.3.1 in the Flexible and Interoperable Data Transfer Protocol Rev 2.2 document the header size can be either 12 bytes or 14. Though in the FitHeader.rb file the check prints an error message if the size is not 14. https://github.com/scrapper/fit4ruby/blob/master/lib/fit4ruby/FitHeader.rb#L30

The error message is "Unsupported header size #{@header.header_size}". Is this intended to warn in the case the header size is 12 bytes or does it mean one tries to parse a faulty file?

karl-petter commented 8 years ago

Changed in https://github.com/scrapper/fit4ruby/pull/6 so 12 bytes are accepted.