diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-04-20 03:09:25 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-04-24 16:14:29 +0200 |
commit | 82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch) | |
tree | 965f6eb89b84d65a62b49008fd972c004832ccd1 /node_modules/crc32-stream | |
parent | e6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff) | |
download | wallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.xz |
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules
into one file (plus commons chunks) for every entry point. This results
in a much smaller extension size (almost half). Furthermore we use
yarn/npm even for extension run-time dependencies. This relieves us
from manually vendoring and building dependencies. It's also easier to
understand for new developers familiar with node.
Diffstat (limited to 'node_modules/crc32-stream')
-rw-r--r-- | node_modules/crc32-stream/README.md | 4 | ||||
-rw-r--r-- | node_modules/crc32-stream/lib/crc32-stream.js | 12 | ||||
-rw-r--r-- | node_modules/crc32-stream/lib/deflate-crc32-stream.js | 12 | ||||
-rw-r--r-- | node_modules/crc32-stream/package.json | 10 |
4 files changed, 20 insertions, 18 deletions
diff --git a/node_modules/crc32-stream/README.md b/node_modules/crc32-stream/README.md index 040bdef07..a0b508054 100644 --- a/node_modules/crc32-stream/README.md +++ b/node_modules/crc32-stream/README.md @@ -1,9 +1,7 @@ -# crc32-stream v1.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 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
```bash
diff --git a/node_modules/crc32-stream/lib/crc32-stream.js b/node_modules/crc32-stream/lib/crc32-stream.js index 42cb45400..f0b0ee6c7 100644 --- a/node_modules/crc32-stream/lib/crc32-stream.js +++ b/node_modules/crc32-stream/lib/crc32-stream.js @@ -8,7 +8,7 @@ var inherits = require('util').inherits;
var Transform = require('readable-stream').Transform;
-var crc32 = require('buffer-crc32');
+var crc32 = require('crc').crc32;
var CRC32Stream = module.exports = function CRC32Stream(options) {
Transform.call(this, options);
@@ -29,14 +29,16 @@ CRC32Stream.prototype._transform = function(chunk, encoding, callback) { callback(null, chunk);
};
-CRC32Stream.prototype.digest = function() {
- return crc32.unsigned(0, this.checksum);
+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();
};
CRC32Stream.prototype.size = function() {
return this.rawSize;
-};
\ No newline at end of file +};
diff --git a/node_modules/crc32-stream/lib/deflate-crc32-stream.js b/node_modules/crc32-stream/lib/deflate-crc32-stream.js index 944eb0d0a..d55c2032c 100644 --- a/node_modules/crc32-stream/lib/deflate-crc32-stream.js +++ b/node_modules/crc32-stream/lib/deflate-crc32-stream.js @@ -8,7 +8,7 @@ var zlib = require('zlib');
var inherits = require('util').inherits;
-var crc32 = require('buffer-crc32');
+var crc32 = require('crc').crc32;
var DeflateCRC32Stream = module.exports = function (options) {
zlib.DeflateRaw.call(this, options);
@@ -48,12 +48,14 @@ DeflateCRC32Stream.prototype.write = function(chunk, enc, cb) { return zlib.DeflateRaw.prototype.write.call(this, chunk, enc, cb);
};
-DeflateCRC32Stream.prototype.digest = function() {
- return crc32.unsigned(0, this.checksum);
+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();
};
DeflateCRC32Stream.prototype.size = function(compressed) {
@@ -64,4 +66,4 @@ DeflateCRC32Stream.prototype.size = function(compressed) { } else {
return this.rawSize;
}
-};
\ No newline at end of file +};
diff --git a/node_modules/crc32-stream/package.json b/node_modules/crc32-stream/package.json index e27b06964..d7ecbb3b5 100644 --- a/node_modules/crc32-stream/package.json +++ b/node_modules/crc32-stream/package.json @@ -1,6 +1,6 @@ {
"name": "crc32-stream",
- "version": "1.0.0",
+ "version": "2.0.0",
"description": "a streaming CRC32 checksumer",
"homepage": "https://github.com/archiverjs/node-crc32-stream",
"author": {
@@ -26,12 +26,12 @@ "test": "mocha --reporter dot"
},
"dependencies": {
- "readable-stream": "^2.0.0",
- "buffer-crc32": "^0.2.1"
+ "crc": "^3.4.4",
+ "readable-stream": "^2.0.0"
},
"devDependencies": {
"chai": "^3.4.0",
- "mocha": "^2.3.0"
+ "mocha": "^3.2.0"
},
"keywords": [
"crc32-stream",
@@ -42,4 +42,4 @@ "publishConfig": {
"registry": "https://registry.npmjs.org/"
}
-}
\ No newline at end of file +}
|