# Bstf

The "bstf" format allows an entire Stof document to be serialized into a binary blob (or just a specific node/object). It will capture all functions, complex embedded data, attributes, types, fields, etc., and can then be stored or shared (or sent to another environment/runtime to keep running).

```rust
#[main]
fn main() {
    const object = new {
        msg: "hello, world",
        val: 42,
    };
    const bytes = blobify("bstf", object);
    assert_eq(typeof bytes, "blob");

    const dest = new {};
    parse(bytes, dest, "bstf");
    assert_eq(dest.msg, "hello, world");
    assert_eq(dest.val, 42);
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stof.dev/formats/bstf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
