Calculate the length of the serialized frame.
@override int get length => headerLength + data.length;