Skip to content

Gets a Byte at a Given Index from a variety of in-memory data formats, including Uint8Array, Buffer, DataView, and Array Buffer

License

Notifications You must be signed in to change notification settings

DanielJDufour/get-byte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-byte

A Universal way of getting a Byte at a Given Index from a variety of in-memory data formats, including Uint8Array, Buffer, DataView, and Array Buffer

install

npm install get-byte

usage

import getByte from 'get-byte';

// gets the 10th byte from a buffer
getByte(buffer, 10);

// gets the 10th byte from an array buffer
getByte(arrayBuffer, 10);

// gets the 10th byte from a data view
getByte(dataView, 10);

// gets the 10th byte from a Uint8Array
getByte(uint8Array, 10);

About

Gets a Byte at a Given Index from a variety of in-memory data formats, including Uint8Array, Buffer, DataView, and Array Buffer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published