New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@rbxts/bitbuffer2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbxts/bitbuffer2

Typings for rstk's BitBuffer module

latest
Source
npmnpm
Version
1.0.0-ts.0
Version published
Maintainers
1
Created
Source

BitBuffer

Typings for rstk's BitBuffer module.

Installation

npm i @rbxts/bitbuffer2

Usage

import BitBuffer from "@rbxts/bitbuffer2";

class PlayerData {
        public Money: number;

        public Experience: number;

        public AverageFps: number;

        public CustomName: string;

        public constructor(serialized?: string) {
                const buffer = BitBuffer.FromBase91(serialized);

                this.Money = buffer.ReadUInt(32);
                this.Experience = buffer.ReadUInt(16);
                this.AverageFps = buffer.ReadFloat32();
		this.CustomName = buffer.ReadString();
        }

        public Serialize() {
                const buffer = new BitBuffer();

                buffer.WriteUInt(32, this.Money);
                buffer.WriteUInt(16, this.Experience);
                buffer.WriteFloat32(this.AverageFps);
                buffer.WriteString(this.CustomName);

                return buffer.ToBase91();
        }
}

export = PlayerData;

FAQs

Package last updated on 24 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts