bytelength
Bytelength is the number of bytes required to represent data in a given character encoding, typically for a string or other text payload. It is distinct from character length, which counts characters or code points rather than storage size. The bytelength of data depends on the encoding used and can vary even for strings that appear identical in a different context.
In ASCII, bytelength equals the number of characters since each ASCII character is encoded in one byte.
Measuring bytelength is language- and encoding-specific. Python reports it as len(s.encode('utf-8')), or len(b) for bytes objects.
Applications include network transmission, file formats, database field limits, and user interfaces where storage or bandwidth