Okay, but then you wind up with two distinct types (`Ring` and `RingHeader`) that are 90% overlapping (because they both must contain encoding parameters).

Another alternative would be to call a separate function to calculate the encoding parameters. Then you could pass those in as arguments to `EncodeRing`, which would just return the encoded segments.