Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uint64be

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uint64be

Encode / decode big endian unsigned 64 bit integers

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
80K
decreased by-34.87%
Maintainers
1
Weekly downloads
 
Created

What is uint64be?

The uint64be npm package is designed to handle 64-bit unsigned integers in big-endian format. It provides utilities to encode and decode these integers to and from buffers, which is useful in various applications such as binary data processing, network protocols, and file formats that require precise control over byte order and integer representation.

What are uint64be's main functionalities?

Encoding a 64-bit unsigned integer to a buffer

This feature allows you to encode a 64-bit unsigned integer into a buffer in big-endian format. The code sample demonstrates encoding the integer 1234567890123456789 into a buffer.

const uint64be = require('uint64be');
const buffer = Buffer.alloc(8);
uint64be.encode(1234567890123456789n, buffer);
console.log(buffer);

Decoding a 64-bit unsigned integer from a buffer

This feature allows you to decode a 64-bit unsigned integer from a buffer in big-endian format. The code sample demonstrates decoding a buffer into the integer value.

const uint64be = require('uint64be');
const buffer = Buffer.from([0x11, 0x22, 0x10, 0xF4, 0x7D, 0xE9, 0x81, 0x15]);
const value = uint64be.decode(buffer);
console.log(value);

Other packages similar to uint64be

FAQs

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc