Skip to main content

util

Namespace containing functions for pushing & popping values directly from the cursor.

Functions

tryrealloc

util.tryrealloc(
cursorCursor,
sizenumber
) → ()

Reallocates the buffer if the cursor position + size exceed the buffer size.

setpos

util.setpos(
cursorCursor,
posnumber
) → ()

Sets the current position of the cursor.

getpos

util.getpos(cursorCursor) → number

Gets the current position of the cursor.

setbuf

util.setbuf(
cursorCursor,
bufbuffer
) → ()

Sets the current buffer of the cursor.

getbuf

util.getbuf(cursorCursor) → buffer

Gets the current buffer of the cursor.

pushu1

util.pushu1(
cursorCursor,
xnumber--

8 bits unsigned number

) → ()

popu1

util.popu1(cursorCursor) → number--

8 bits unsigned number

pushu2

util.pushu2(
cursorCursor,
xnumber--

16 bits unsigned number

) → ()

popu2

util.popu2(cursorCursor) → number--

16 bits unsigned number

pushu3

util.pushu3(
cursorCursor,
xnumber--

24 bits unsigned number

) → ()

popu3

util.popu3(cursorCursor) → number--

24 bits unsigned number

pushu4

util.pushu4(
cursorCursor,
xnumber--

32 bits unsigned number

) → ()

popu4

util.popu4(cursorCursor) → number--

32 bits unsigned number

pushu5

util.pushu5(
cursorCursor,
xnumber--

40 bits unsigned number

) → ()

popu5

util.popu5(cursorCursor) → number--

40 bits unsigned number

pushu6

util.pushu6(
cursorCursor,
xnumber--

48 bits unsigned number

) → ()

popu6

util.popu6(cursorCursor) → number--

48 bits unsigned number

pushu7

util.pushu7(
cursorCursor,
xnumber--

56 bits unsigned number

) → ()

popu7

util.popu7(cursorCursor) → number--

56 bits unsigned number

pushu8

util.pushu8(
cursorCursor,
xnumber--

64 bits unsigned number

) → ()

popu8

util.popu8(cursorCursor) → number--

64 bits unsigned number

pushi1

util.pushi1(
cursorCursor,
xnumber--

8 bits signed number

) → ()

popi1

util.popi1(cursorCursor) → number--

8 bits signed number

pushi2

util.pushi2(
cursorCursor,
xnumber--

16 bits signed number

) → ()

popi2

util.popi2(cursorCursor) → number--

16 bits signed number

pushi3

util.pushi3(
cursorCursor,
xnumber--

24 bits signed number

) → ()

popi3

util.popi3(cursorCursor) → number--

24 bits signed number

pushi4

util.pushi4(
cursorCursor,
xnumber--

32 bits signed number

) → ()

popi4

util.popi4(cursorCursor) → number--

32 bits signed number

pushi5

util.pushi5(
cursorCursor,
xnumber--

40 bits signed number

) → ()

popi5

util.popi5(cursorCursor) → number--

40 bits signed number

pushi6

util.pushi6(
cursorCursor,
xnumber--

48 bits signed number

) → ()

popi6

util.popi6(cursorCursor) → number--

48 bits signed number

pushi7

util.pushi7(
cursorCursor,
xnumber--

56 bits signed number

) → ()

popi7

util.popi7(cursorCursor) → number--

56 bits signed number

pushi8

util.pushi8(
cursorCursor,
xnumber--

64 bits signed number

) → ()

popi8

util.popi8(cursorCursor) → number--

64 bits signed number

pushf2

util.pushf2(
cursorCursor,
xnumber--

16 bits float number

) → ()

popf2

util.popf2(cursorCursor) → number--

16 bits float number

pushf4

util.pushf4(
cursorCursor,
xnumber--

32 bits float number

) → ()

popf4

util.popf4(cursorCursor) → number--

32 bits float number

pushf8

util.pushf8(
cursorCursor,
xnumber--

64 bits float number

) → ()

popf8

util.popf8(cursorCursor) → number--

64 bits float number

pushbool

util.pushbool(
cursorCursor,
boolboolean
) → ()

popbool

util.popbool(cursorCursor) → boolean

pushboolpack

util.pushboolpack(
cursorCursor,
...boolean?
) → ()

Packs up to 8 booleans into a single byte and writes it into the buffer.

popboolpack

util.popboolpack(cursorCursor) → boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean

Reads 8 packed booleans from the buffer.

pushvlqrealloc

util.pushvlqrealloc(
cursorCursor,
xnumber
) → ()

Writes a variable length unsigned integer into the buffer and allocates the bytes needed for it.

popvlq

util.popvlq(cursorCursor) → number

Reads a variable length unsigned integer from the buffer.

pushstr

util.pushstr(
cursorCursor,
xstring,
lengthnumber?
) → ()

Writes a string to the cursor.

popstr

util.popstr(
cursorCursor,
lengthnumber?
) → string

Reads a string from the cursor.

pushbuf

util.pushbuf(
cursorCursor,
xbuffer,
lengthnumber?
) → ()

Writes a buffer to the cursor.

popbuf

util.popbuf(
cursorCursor,
lengthnumber?
) → buffer

Reads a buffer from the cursor.

serbitarr

util.serbitarr(
cursorCursor,
bits{boolean},
lengthnumber?--

Fixed length for the bit array

) → ()

Serializes an array of booleans as a bit array into the buffer.

desbitarr

util.desbitarr(
cursorCursor,
bitCountnumber--

Length of the bit array

) → {boolean}

Deserializes a bit array of bitCount length from the buffer.

pushref

util.pushref(
cursorCursor,
vany
) → ()

Adds a value to the 'references' table.

popref

util.popref(cursorCursor) → any

Removes a value from the 'references' table using the current vlq.

Show raw api
{
    "functions": [
        {
            "name": "tryrealloc",
            "desc": "Reallocates the buffer if the cursor position + size exceed the buffer size.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "size",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 108,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "setpos",
            "desc": "Sets the current position of the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "pos",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 114,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "getpos",
            "desc": "Gets the current position of the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 120,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "setbuf",
            "desc": "Sets the current buffer of the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "buf",
                    "desc": "",
                    "lua_type": "buffer"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 126,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "getbuf",
            "desc": "Gets the current buffer of the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "buffer"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 132,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu1",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "8 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 137,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu1",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "8 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 142,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "16 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 147,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "16 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 152,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu3",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "24 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 157,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu3",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "24 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 162,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "32 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 167,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "32 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 172,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu5",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "40 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 177,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu5",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "40 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 182,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu6",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "48 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 187,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu6",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "48 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 192,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu7",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "56 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 197,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu7",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "56 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 202,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushu8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "64 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 207,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popu8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "64 bits unsigned number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 212,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi1",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "8 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 217,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi1",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "8 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 222,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "16 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 227,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "16 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 232,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi3",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "24 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 237,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi3",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "24 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 242,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "32 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 247,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "32 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 252,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi5",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "40 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 257,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi5",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "40 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 262,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi6",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "48 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 267,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi6",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "48 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 272,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi7",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "56 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 277,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi7",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "56 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 282,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushi8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "64 bits signed number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 287,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popi8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "64 bits signed number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 292,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushf2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "16 bits float number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 297,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popf2",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "16 bits float number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 302,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushf4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "32 bits float number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 307,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popf4",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "32 bits float number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 312,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushf8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "64 bits float number",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 317,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popf8",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "64 bits float number",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 322,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushbool",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "bool",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 327,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popbool",
            "desc": "",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 332,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushboolpack",
            "desc": "Packs up to 8 booleans into a single byte and writes it into the buffer.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 338,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popboolpack",
            "desc": "Reads 8 packed booleans from the buffer.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 344,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushvlqrealloc",
            "desc": "Writes a variable length unsigned integer into the buffer and allocates the bytes needed for it.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 350,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popvlq",
            "desc": "Reads a variable length unsigned integer from the buffer.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 356,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushstr",
            "desc": "Writes a string to the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 363,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popstr",
            "desc": "Reads a string from the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 370,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushbuf",
            "desc": "Writes a buffer to the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "x",
                    "desc": "",
                    "lua_type": "buffer"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 377,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popbuf",
            "desc": "Reads a buffer from the cursor.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "buffer"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 384,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "serbitarr",
            "desc": "Serializes an array of booleans as a bit array into the buffer.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "bits",
                    "desc": "",
                    "lua_type": "{boolean}"
                },
                {
                    "name": "length",
                    "desc": "Fixed length for the bit array",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 391,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "desbitarr",
            "desc": "Deserializes a bit array of `bitCount` length from the buffer.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "bitCount",
                    "desc": "Length of the bit array",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{boolean}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 398,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "pushref",
            "desc": "Adds a value to the 'references' table.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                },
                {
                    "name": "v",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 404,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "popref",
            "desc": "Removes a value from the 'references' table using the current vlq.",
            "params": [
                {
                    "name": "cursor",
                    "desc": "",
                    "lua_type": "Cursor"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 410,
                "path": "docs_luau/moonwave.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "util",
    "desc": "Namespace containing functions for pushing & popping values directly from the cursor.",
    "source": {
        "line": 102,
        "path": "docs_luau/moonwave.luau"
    }
}