Socket
Socket
Sign inDemoInstall

crc32-stream

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crc32-stream - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

4

CHANGELOG.md
## Changelog
**2.0.0** — <small>_February 13, 2017_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/1.0.1...2.0.0)
- adopt nodejs core Hash API (GH #4)
**1.0.1** — <small>_January 12, 2016_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/1.0.0...1.0.1)

@@ -4,0 +8,0 @@

10

lib/crc32-stream.js

@@ -32,8 +32,10 @@ /**

CRC32Stream.prototype.digest = function() {
return this.checksum >>> 0;
CRC32Stream.prototype.digest = function(encoding) {
var checksum = new Buffer(4);
checksum.writeUInt32BE(this.checksum >>> 0, 0);
return encoding ? checksum.toString(encoding) : checksum;
};
CRC32Stream.prototype.hex = function() {
return this.digest().toString(16).toUpperCase();
return this.digest('hex').toUpperCase();
};

@@ -43,2 +45,2 @@

return this.rawSize;
};
};

@@ -51,8 +51,10 @@ /**

DeflateCRC32Stream.prototype.digest = function() {
return this.checksum >>> 0;
DeflateCRC32Stream.prototype.digest = function(encoding) {
var checksum = new Buffer(4);
checksum.writeUInt32BE(this.checksum >>> 0, 0);
return encoding ? checksum.toString(encoding) : checksum;
};
DeflateCRC32Stream.prototype.hex = function() {
return this.digest().toString(16).toUpperCase();
return this.digest('hex').toUpperCase();
};

@@ -68,2 +70,2 @@

}
};
};
{
"name": "crc32-stream",
"version": "1.0.1",
"version": "2.0.0",
"description": "a streaming CRC32 checksumer",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/archiverjs/node-crc32-stream",

@@ -1,7 +0,5 @@

# crc32-stream v1.0.1 [![Build Status](https://travis-ci.org/archiverjs/node-crc32-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-crc32-stream) [![Build status](https://ci.appveyor.com/api/projects/status/sy60s39cmyvd60i3/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-crc32-stream/branch/master)
# crc32-stream v2.0.0 [![Build Status](https://travis-ci.org/archiverjs/node-crc32-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-crc32-stream) [![Build status](https://ci.appveyor.com/api/projects/status/sy60s39cmyvd60i3/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-crc32-stream/branch/master)
crc32-stream is a streaming CRC32 checksumer. It uses [buffer-crc32](https://www.npmjs.org/package/buffer-crc32) behind the scenes to reliably handle binary data and fancy character sets. Data is passed through untouched.
[![NPM](https://nodei.co/npm/crc32-stream.png)](https://nodei.co/npm/crc32-stream/)
### Install

@@ -8,0 +6,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