calculate_content_size#

langchain_community.utilities.pebblo.calculate_content_size(data: str) int[source]#

Calculate the content size in bytes: - Encode the string to bytes using a specific encoding (e.g., UTF-8) - Get the length of the encoded bytes.

Parameters:

data (str) – Data string.

Returns:

Size of string in bytes.

Return type:

int