1.0.2 • Published 1 year ago

@nodetf/buffer v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NBuffer - A Java Buffer Impl

This Buffer class works the same as this

Example

import NBuffer from "@nodetf/buffer";
import { readFileSync } from "node:fs"

// Parameters are like the DataView class
const buffer = new NBuffer(readFileSync("file.bin"));

// Read the first integer from the buffer
const int = buffer.readInt32();
// Read the unsigned byte after the first integer
const ubyte = buffer.readUInt8();