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

@stardazed/adler32

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stardazed/adler32

Stardazed - adler32 algorithm

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

sd-adler32

Compute the Adler-32 checksum of a data stream.

Installation

⚠️ Important: This package, like everything in the @stardazed org, is distributed as an ES2015 module and is intended for use in browsers, not in NodeJS per se. Browser-specific types may be used.

yarn add @stardazed/adler32

or

npm install --save @stardazed/adler32

Usage

/**
 * Compute the Adler-32 checksum of a source.
 * This method will do its best to get a correct stream of unsigned bytes out
 * of the specified input, but take care when passing in basic arrays.
 * You can use `adler32Bytes` for the "I know what I'm doing" version.
 * @param data Source data, a string, array, TypedArray or ArrayBuffer
 * @param adler Optional seed for the checksum
 */
function adler32(data: string | number[] | TypedArray | DataView | ArrayBuffer, seed?: number): number;

/**
 * Compute the Adler-32 checksum of a sequence of unsigned bytes.
 * Make very sure that the individual elements in buf are all
 * in the UNSIGNED byte range (i.e. 0..255) otherwise the
 * result will be indeterminate.
 * @param buf Source data, an array-like of unsigned bytes
 * @param adler Optional seed for the checksum
 */
function adler32Bytes(buf: ArrayLike<number>, adler?: number): number;

Copyright (C) 1995-2011, 2016 Mark Adler
Converted to TypeScript by Arthur Langereis (@zenmumbler)
from adler32.c, which can be found at:
https://github.com/madler/zlib/blob/master/adler32.c

License

zlib

FAQs

Package last updated on 04 Jun 2018

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