#include "third_party/blink/renderer/platform/data_resource_helper.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
String UncompressResourceAsString(int resource_id) {
std::string data = Platform::Current()->GetDataResourceString(resource_id);
return String::FromUTF8(data);
}
String UncompressResourceAsASCIIString(int resource_id) {
String result(Platform::Current()->GetDataResourceString(resource_id));
DCHECK(result.ContainsOnlyASCIIOrEmpty());
return result;
}
Vector<char> UncompressResourceAsBinary(int resource_id) {
std::string data = Platform::Current()->GetDataResourceString(resource_id);
Vector<char> result;
result.AppendSpan(base::span(data));
return result;
}
}