GetByteCount

IDicomEncoding.GetByteCount method

Calculates the number of bytes that encoding all the characters in the specified string would produce, given the same fallback and delimiter logic as your GetBytes method.

public int GetByteCount(string data, Encoding[] encodings, ReadOnlySpan<byte> delimiters)
ParameterTypeDescription
dataStringThe string containing the characters to encode.
encodingsEncoding[]Encodings used to encode the given data (for final‐fallback).
delimitersReadOnlySpan`1Delimiters in text values that reset the encoding.

Return Value

The total number of bytes that your GetBytes would have returned.

See Also