Skip to content

A simple, light and fast bytebuffer implementation under node.js

License

Notifications You must be signed in to change notification settings

mathishouis/buffer.ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buffer.ws

A simple, light and fast bytebuffer implementation under node.js

Hits Inline docs

Table of Contents

Installation

Install the package:

npm i buffer.ws

Importing the package with require:

var BufferWS = require("buffer.ws");

or with import:

import { BufferWS } from 'buffer.ws';

Usage

Example:

var BufferWS = require("buffer.ws");

var buffer = new BufferWS()
                .writeInt(39)
                .writeString("Hello!")
                .flip();
console.log(buffer.readInt(), buffer.readString()); // 39 Hello!

Wiki

Testing

npm run test