🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

b2f

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b2f

Convert a series of 8-bit signed integers to 32-bit floats

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

b2f

Convert a series of 8-bit signed integers to 32-bit floats.

Build status js-standard-style

Installation

Install globally to use from the command line:

npm install b2f --global

Install as dependency to use programmatically:

npm install b2f --save

CLI Usage:

cat input.bin | b2f > output.bin

Programmatic Usage:

var b2f = require('b2f')

var input = new Buffer('01020304', 'hex')
var output = b2f(input)

console.log(output.toString('hex')) // 0000003c0000803c0000c03c0000003d

API

var output = b2f(input)

Returns a Buffer object four times the size of input with each byte converted the a 32-bit float (little endian).

It's expected that each byte in input is of type 8-bit signed integer.

License

MIT

Keywords

number

FAQs

Package last updated on 21 Jan 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