The min_code_units and max_code_units data members of encoding types were originally added to facilitate code unit storage allocation given a sequence of code points. For encodings like UTF16 with a BOM, these data members don't suffice due to the storage overhead required for a BOM. Additionally, encodings that support non-code-point encoding state transitions, overhead is potentially unbounded and not reflected in these values.
At present, these values are only used to determine if an encoding can potentially support random access to code points (when min_code_units == max_code_units and the encoding is stateless). Removal of these data members will require some other means to determine if an encoding is a stateless fixed-length encoding.
The min_code_units and max_code_units data members of encoding types were originally added to facilitate code unit storage allocation given a sequence of code points. For encodings like UTF16 with a BOM, these data members don't suffice due to the storage overhead required for a BOM. Additionally, encodings that support non-code-point encoding state transitions, overhead is potentially unbounded and not reflected in these values.
At present, these values are only used to determine if an encoding can potentially support random access to code points (when min_code_units == max_code_units and the encoding is stateless). Removal of these data members will require some other means to determine if an encoding is a stateless fixed-length encoding.