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

adler-32

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adler-32

Pure-JS ADLER-32

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is adler-32?

The adler-32 npm package is used for computing Adler-32 checksums. Adler-32 is a checksum algorithm which was designed to be a fast but not cryptographically secure alternative to CRC32. The algorithm is used in the zlib compression library. The adler-32 package provides functionality to calculate Adler-32 checksums for given inputs, which can be useful for error-checking or simple data integrity verification.

What are adler-32's main functionalities?

Calculate Adler-32 checksum from a string

This feature allows you to calculate the Adler-32 checksum of a given string. The 'str' method takes a string as input and returns the checksum as a number.

const adler32 = require('adler-32');
const checksum = adler32.str('Hello World');
console.log(checksum);

Calculate Adler-32 checksum from a buffer

This feature allows you to calculate the Adler-32 checksum of a given buffer. The 'buf' method takes a Node.js Buffer as input and returns the checksum as a number.

const adler32 = require('adler-32');
const buffer = Buffer.from('Hello World');
const checksum = adler32.buf(buffer);
console.log(checksum);

Calculate Adler-32 checksum and return result in hex format

This feature allows you to calculate the Adler-32 checksum of a given string and return the result in hexadecimal format. The second argument to the 'str' method is a boolean indicating whether the output should be in hex format.

const adler32 = require('adler-32');
const checksum = adler32.str('Hello World', true);
console.log(checksum);

Other packages similar to adler-32

Keywords

FAQs

Package last updated on 30 Mar 2022

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