https://github.com/mathishouis/buffer.ws
A simple, light and fast bytebuffer implementation under node.js
https://github.com/mathishouis/buffer.ws
array arraybuffer buffer bytebuffer javascript nodejs typescript websocket
Last synced: 6 months ago
JSON representation
A simple, light and fast bytebuffer implementation under node.js
- Host: GitHub
- URL: https://github.com/mathishouis/buffer.ws
- Owner: mathishouis
- License: gpl-3.0
- Created: 2021-12-19T00:56:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T16:00:06.000Z (over 2 years ago)
- Last Synced: 2025-06-26T15:12:00.307Z (6 months ago)
- Topics: array, arraybuffer, buffer, bytebuffer, javascript, nodejs, typescript, websocket
- Language: TypeScript
- Homepage:
- Size: 85 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buffer.ws
A simple, light and fast bytebuffer implementation under node.js
[](https://hits.seeyoufarm.com)
[](https://www.npmjs.com/package/buffer.ws)
## Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [Wiki](#wiki)
* [Testing](#testing)
## Installation
Install the package:
```
npm i buffer.ws
```
Importing the package with require:
```js
var BufferWS = require("buffer.ws");
```
or with import:
```js
import { BufferWS } from 'buffer.ws';
```
## Usage
Example:
```js
var BufferWS = require("buffer.ws");
var buffer = new BufferWS()
.writeInt(39)
.writeString("Hello!")
.flip();
console.log(buffer.readInt(), buffer.readString()); // 39 Hello!
```
## Wiki
* [Home](https://github.com/kozennnn/buffer.ws/wiki)
* [Documentation](https://github.com/kozennnn/buffer.ws/wiki/Documentation)
## Testing
```
npm run test
```