Socket
Socket
Sign inDemoInstall

@protobufjs/float

Package Overview
Dependencies
0
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @protobufjs/float

Reads / writes floats / doubles from / to buffers in both modern and ancient browsers.


Version published
Maintainers
2
Install size
21.2 kB
Created

Readme

Source

@protobufjs/float

npm

Reads / writes floats / doubles from / to buffers in both modern and ancient browsers. Fast.

API

  • writeFloatLE(val: number, buf: Uint8Array, pos: number)
    Writes a 32 bit float to a buffer using little endian byte order.

  • writeFloatBE(val: number, buf: Uint8Array, pos: number)
    Writes a 32 bit float to a buffer using big endian byte order.

  • readFloatLE(buf: Uint8Array, pos: number): number
    Reads a 32 bit float from a buffer using little endian byte order.

  • readFloatBE(buf: Uint8Array, pos: number): number
    Reads a 32 bit float from a buffer using big endian byte order.

  • writeDoubleLE(val: number, buf: Uint8Array, pos: number)
    Writes a 64 bit double to a buffer using little endian byte order.

  • writeDoubleBE(val: number, buf: Uint8Array, pos: number)
    Writes a 64 bit double to a buffer using big endian byte order.

  • readDoubleLE(buf: Uint8Array, pos: number): number
    Reads a 64 bit double from a buffer using little endian byte order.

  • readDoubleBE(buf: Uint8Array, pos: number): number
    Reads a 64 bit double from a buffer using big endian byte order.

License: BSD 3-Clause License

FAQs

Last updated on 01 Apr 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc