@seirdotexe/bytearray

1.0.5 • Public • Published

ByteArray

NPM Version

The ActionScript ByteArray class, written in modern JavaScript.

Install

$ npm install @seirdotexe/bytearray

Usage

Below you'll find an easy showcase of the library. You can also check out the tests for an extensive showcase on how to use the library.

import ByteArray, { Enums } from '@seirdotexe/bytearray';

const bytearr = new ByteArray();

bytearr.endian = Enums.Endian.LITTLE_ENDIAN;

bytearr.writeByte(25);
bytearr.writeShort(1600);
bytearr.writeBoolean(false);
bytearr.writeUTF('Test_Message');

bytearr.position = 0;

bytearr.readByte(); // 25
bytearr.readShort(); // 1600
bytearr.readBoolean(); // false
bytearr.readUTF(); // Test_Message

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @seirdotexe/bytearray

    Weekly Downloads

    5

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    47.9 kB

    Total Files

    24

    Last publish

    Collaborators

    • seirdotexe