Skip to content

Wrapper around Buffer object keeping track of current position during reading from or writing to it.

Notifications You must be signed in to change notification settings

bam-ftw/buffer-walker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BufferWalker

Wrapper around Buffer object keeping track of current position during reading from or writing to it.

Example

const BufferWalker = require('buffer-walker');

const buffer = Buffer.alloc(8);
const walker = new BufferWalker(buffer);

walker.writeInt32BE(1);
walker.writeInt32BE(2);

console.log(buffer);

walker.goToStart();

console.log(walker.readInt32BE());
console.log(walker.readInt32BE());

Tests

mocha

About

Wrapper around Buffer object keeping track of current position during reading from or writing to it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published