Google.Protobuf.ByteString
Immutable array of bytes.
Returns an empty ByteString.
Returns true if this byte string is empty, false otherwise.
Returns the byte at the given index.
Returns the length of this ByteString in bytes.
Provides read-only access to the data of this ByteString.
No data is copied so this is the most efficient way of accessing.
Provides read-only access to the data of this ByteString.
No data is copied so this is the most efficient way of accessing.
Constructs a ByteString from the given array. The contents
are copied, so further modifications to the array will not
be reflected in the returned ByteString.
This method can also be invoked in ByteString.CopyFrom(0xaa, 0xbb, ...) form
which is primarily useful for testing.
Constructs a ByteString from a portion of a byte array.
Constructs a ByteString from a read only span. The contents
are copied, so further modifications to the span will not
be reflected in the returned ByteString.
Creates a new ByteString by encoding the specified text with
the given encoding.
Creates a new ByteString by encoding the specified text in UTF-8.
Constructs a ByteString from the Base64 Encoded String.
Constructs a ByteString from data in the given stream, synchronously.
public static Task<ByteString> FromStreamAsync(Stream stream, CancellationToken cancellationToken = default)
Constructs a ByteString from data in the given stream, asynchronously.
Compares two byte strings for equality.
Compares two byte strings for inequality.
Copies the entire byte array to the destination array provided at the offset specified.
Creates a CodedInputStream from this ByteString's data.
Compares this byte string with another.
Returns an iterator over the bytes in this ByteString.
Converts this ByteString into a standard base64 representation.
Converts this ByteString into a byte array.
Converts this ByteString into a string by applying the given encoding.
Converts this ByteString into a string by applying the UTF-8 encoding.
Writes the entire byte array to the provided stream