#ifndef QJS_BLOB_H
#define QJS_BLOB_H

#include "cell.h"
#include "blob.h"

#ifdef __cplusplus
extern "C" {
#endif

JSValue js_blob_use(JSContext *ctx);

// makes a new stone blob from data, copying the data over
JSValue js_new_blob_stoned_copy(JSContext *js, void *data, size_t bytes);

// returns undefined if the blob is not stone
void *js_get_blob_data(JSContext *js, size_t *size, JSValue v);

int js_is_blob(JSContext *js, JSValue v);

#ifdef __cplusplus
}
#endif

#endif
