New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nbit

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nbit

getUint2

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

nbit

Work with 2-bit data

Current Methods

getUint2

Coming Soon

Uint2Array

Usage

    import { getUint2 } from 'nbit';

    // get second 2bit value
    let value = getUint2.call(dataView, 0.25);

getUint2

getUint2 works just like getUint8. You still pass in how many bytes the value that you are looking for is offset. This leads us to passing in a byteOffset parameter that is a multiple of 0.25. For example, 7.25 bytes would refer to 58 bits offset (7.25 * 8 bits), which for a 2-bit array is 29 values offset.

Keywords

bit

FAQs

Package last updated on 02 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts