Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@webassemblyjs/ieee754
Advanced tools
The @webassemblyjs/ieee754 package is designed for encoding and decoding floating-point numbers according to the IEEE 754 standard. This is particularly useful when working with WebAssembly, as it allows for precise handling of floating-point numbers in a format that's compatible with WebAssembly's binary representation.
Encoding floating-point numbers
This feature allows you to encode JavaScript floating-point numbers into a format that's compatible with WebAssembly's binary representation. The example shows how to encode the number 1.5 as a 64-bit floating-point number.
const { encode } = require('@webassemblyjs/ieee754');
const buffer = new ArrayBuffer(8);
const view = new DataView(buffer);
encode(view, 0, 1.5, 64);
Decoding floating-point numbers
This feature allows you to decode floating-point numbers from a binary format into JavaScript numbers. The example demonstrates decoding a 64-bit floating-point number from a DataView into a JavaScript number.
const { decode } = require('@webassemblyjs/ieee754');
const buffer = new ArrayBuffer(8);
const view = new DataView(buffer);
view.setFloat64(0, 1.5, true);
const number = decode(view, 0, 64);
The ieee754 package provides similar functionality for encoding and decoding IEEE 754 floating-point numbers. It is widely used for operations that require direct manipulation of binary data in this format. Compared to @webassemblyjs/ieee754, it serves a broader audience beyond just the WebAssembly community, offering a more general-purpose approach to handling IEEE 754 floating-point numbers.
FAQs
IEEE754 decoder and encoder
The npm package @webassemblyjs/ieee754 receives a total of 20,832,012 weekly downloads. As such, @webassemblyjs/ieee754 popularity was classified as popular.
We found that @webassemblyjs/ieee754 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.