Converting ReadOnlySequence of bytes to object

I have to convert a ReadOnlySequence<byte> to an object, the way I'm doing it currently is like so:
    public static DataModel ConvertBytes(ReadOnlySequence<byte> b)
    {
        var msg = new DataModel();

        int location = 8;

        msg.FFOn = BitConverter.ToInt32(b, location) != 0; location += 4;
        msg.FFSel = BitConverter.ToInt32(b, location) != 0; location += 4;
        msg.On = BitConverter.ToInt32(b, location) != 0; location += 4;
        msg.Sel = BitConverter.ToInt32(b, location) != 0; location += 4;
        msg.On = BitConverter.ToInt32(b, location) != 0; location += 4;
        msg.Sel = BitConverter.ToInt32(b, location) != 0; location += 4;

        // ...
        
        location += 76 * 4;

        msg.ZoneShapeTarget01 = BitConverter.ToSingle(b, location); location += 4;
        msg.ZoneShapeTarget02 = BitConverter.ToSingle(b, location); location += 4;
    }

Is there a better way to handle this? BitConverter doesn't support ReadOnlySequence, so I would have to convert it to a byte array which is not ideal. I also have tons of properties on this model so it is a ton of code. Thanks in advance!
Was this page helpful?