Skip to main content

Blob

The Blob Tool is a utility for embedding binary resources into applications by generating Blob-compatible C++ source files. It supports combining multiple files into a single resource, simplifying the deployment of embedded assets such as shaders, fonts, and textures.

The tool produces a standard uint8_t array that can be accessed and decompressed at runtime using the Blob class.

Example output

The generated *.blob header file includes a binary array:

static const uint8_t XRLink_blob_src[][256] = {
{ 0,120,218,165,86,255,111,163,54,20,255,57,249,43,144,42,85,64, ... },
{ 255 },
};

For large resources, an optional *.cpp file that includes the *.blob file can be generated using the -cpp command-line option.

Usage Example

Decompression is straightforward using the Blob class:

// Get shader source
#include "XRLink.blob"
String src = Blob(XRLink_blob_src).gets();

Command Line Parameters

Tellusim Blob File Creator
Usage: ts_blob file.txt file.png
-force Force blob creation
-src Create source blob
-cpp Create cpp blob
-o Output file