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 0.1.2 to 0.2.0

7

lib/crc32-stream.js

@@ -17,2 +17,4 @@ /**

this.checksum.writeInt32BE(0, 0);
this.rawSize = 0;
}

@@ -25,2 +27,3 @@

this.checksum = crc32(chunk, this.checksum);
this.rawSize += chunk.length;
}

@@ -39,2 +42,6 @@

CRC32Stream.prototype.size = function() {
return this.rawSize;
};
module.exports = CRC32Stream;

2

package.json
{
"name": "crc32-stream",
"version": "0.1.2",
"version": "0.2.0",
"description": "a streaming CRC32 checksumer",

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

@@ -1,2 +0,2 @@

# crc32-stream v0.1.2 [![Build Status](https://travis-ci.org/ctalkington/node-crc32-stream.svg?branch=master)](https://travis-ci.org/ctalkington/node-crc32-stream)
# crc32-stream v0.2.0 [![Build Status](https://travis-ci.org/ctalkington/node-crc32-stream.svg?branch=master)](https://travis-ci.org/ctalkington/node-crc32-stream)

@@ -47,2 +47,6 @@ 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.

#### size()
Returns the raw size/length of passed-through data.
### Instance Options

@@ -49,0 +53,0 @@

@@ -19,2 +19,3 @@ /*global before,describe,it */

assert.equal(checksum.hex(), 'E81722F0');
assert.equal(checksum.size(), 16384);
done();

@@ -21,0 +22,0 @@ });

Sorry, the diff of this file is not supported yet

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