SkillAgentSearch skills...

Bitreader.luau

A read-only wrapper for luau buffers

Install / Use

/learn @TechHog8984/Bitreader.luau
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

bitreader.luau

A read-only wrapper for luau buffers

Why use bitreader?

  • bitreader keeps track of its offset
  • bitreader has a readvarint function for luau bytecode (as well as other tools that serve as an example. see luau)

Usage

Create a bitreader with bitreader.frombuffer or bitreader.fromstring:

bitreader.frombuffer(data: buffer, string_len_func: ((...any) -> ...any)?) : bitreader
bitreader.fromstring(data: string, string_len_func: ((...any) -> ...any)?) : bitreader

string_len_func is optional and will be used to get the string's length in bitreader:readstring (if the length argument is omitted)

its default is bitreader:readvarint

Methods

Bitreader wraps all buffer read methods as well as tostring and len.

See https://create.roblox.com/docs/reference/engine/libraries/buffer for more info

bitreader:readvarint(): number
  • bitreader:readstring reads a string that is a certain length. If there is no length argument, string_len_func will be called (see Usage)
bitreader:readstring(length: number?): number
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated2mo ago
Forks0

Languages

Luau

Security Score

85/100

Audited on Jan 9, 2026

No findings