decodeToString method
Decodes the encoded
Brotli data to the corresponding string.
Use encoding
to specify the charset used by encoded
.
Implementation
String decodeToString(
List<int> encoded, {
Encoding? encoding,
}) {
final decoded = decoder.convert(encoded);
return encoding != null
? encoding.decode(decoded)
: String.fromCharCodes(decoded);
}