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

adler32

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adler32 - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

2

package.json
{
"name": "adler32",
"version": "0.1.6",
"version": "0.1.7",
"description": "Adler-32 hashing algorithm",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -75,6 +75,23 @@ # adler32 [![Build Status](https://travis-ci.org/ChrisAckerman/adler32.svg?branch=master)](https://travis-ci.org/ChrisAckerman/adler32)

## Transform Stream Usage
Like the `crypto.Hash` class, `adler32.Hash` extends the `stream.Transform` class. You can use the stream `.write()` and
`.read()` methods in place of the deprecated `.update()` and `.digest()` methods. See the
[Node.js stream module](http://nodejs.org/api/stream.html) documentation for more information about streaming.
`.read()` methods in place of the legacy `.update()` and `.digest()` methods.
var hash = new adler32.Hash({
encoding: 'hex' // Sets the type of data returned by the read() method. Defaults to 'buffer'.
});
// Write data to the stream in multiple chunks.
hash.write('foo');
hash.write('bar');
// This is important! No data will be available for reading until end() is called.
hash.end();
// Read should return a hexidecimal formatted string due to the encoding option being set to 'hex'.
var hex_digest = hash.read();
See the [Node.js stream module](http://nodejs.org/api/stream.html) documentation for more information about streaming.
## Caveats

@@ -81,0 +98,0 @@

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