From cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Mar 2019 21:01:33 +0100 Subject: remove node_modules --- node_modules/crc32-stream/lib/crc32-stream.js | 44 -------------- .../crc32-stream/lib/deflate-crc32-stream.js | 69 ---------------------- node_modules/crc32-stream/lib/index.js | 10 ---- 3 files changed, 123 deletions(-) delete mode 100644 node_modules/crc32-stream/lib/crc32-stream.js delete mode 100644 node_modules/crc32-stream/lib/deflate-crc32-stream.js delete mode 100644 node_modules/crc32-stream/lib/index.js (limited to 'node_modules/crc32-stream/lib') diff --git a/node_modules/crc32-stream/lib/crc32-stream.js b/node_modules/crc32-stream/lib/crc32-stream.js deleted file mode 100644 index f0b0ee6c7..000000000 --- a/node_modules/crc32-stream/lib/crc32-stream.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * node-crc32-stream - * - * Copyright (c) 2014 Chris Talkington, contributors. - * Licensed under the MIT license. - * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT - */ -var inherits = require('util').inherits; -var Transform = require('readable-stream').Transform; - -var crc32 = require('crc').crc32; - -var CRC32Stream = module.exports = function CRC32Stream(options) { - Transform.call(this, options); - this.checksum = new Buffer(4); - this.checksum.writeInt32BE(0, 0); - - this.rawSize = 0; -}; - -inherits(CRC32Stream, Transform); - -CRC32Stream.prototype._transform = function(chunk, encoding, callback) { - if (chunk) { - this.checksum = crc32(chunk, this.checksum); - this.rawSize += chunk.length; - } - - callback(null, chunk); -}; - -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('hex').toUpperCase(); -}; - -CRC32Stream.prototype.size = function() { - return this.rawSize; -}; diff --git a/node_modules/crc32-stream/lib/deflate-crc32-stream.js b/node_modules/crc32-stream/lib/deflate-crc32-stream.js deleted file mode 100644 index d55c2032c..000000000 --- a/node_modules/crc32-stream/lib/deflate-crc32-stream.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * node-crc32-stream - * - * Copyright (c) 2014 Chris Talkington, contributors. - * Licensed under the MIT license. - * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT - */ -var zlib = require('zlib'); -var inherits = require('util').inherits; - -var crc32 = require('crc').crc32; - -var DeflateCRC32Stream = module.exports = function (options) { - zlib.DeflateRaw.call(this, options); - - this.checksum = new Buffer(4); - this.checksum.writeInt32BE(0, 0); - - this.rawSize = 0; - this.compressedSize = 0; - - // BC v0.8 - if (typeof zlib.DeflateRaw.prototype.push !== 'function') { - this.on('data', function(chunk) { - if (chunk) { - this.compressedSize += chunk.length; - } - }); - } -}; - -inherits(DeflateCRC32Stream, zlib.DeflateRaw); - -DeflateCRC32Stream.prototype.push = function(chunk, encoding) { - if (chunk) { - this.compressedSize += chunk.length; - } - - return zlib.DeflateRaw.prototype.push.call(this, chunk, encoding); -}; - -DeflateCRC32Stream.prototype.write = function(chunk, enc, cb) { - if (chunk) { - this.checksum = crc32(chunk, this.checksum); - this.rawSize += chunk.length; - } - - return zlib.DeflateRaw.prototype.write.call(this, chunk, enc, cb); -}; - -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('hex').toUpperCase(); -}; - -DeflateCRC32Stream.prototype.size = function(compressed) { - compressed = compressed || false; - - if (compressed) { - return this.compressedSize; - } else { - return this.rawSize; - } -}; diff --git a/node_modules/crc32-stream/lib/index.js b/node_modules/crc32-stream/lib/index.js deleted file mode 100644 index 31187e38e..000000000 --- a/node_modules/crc32-stream/lib/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * node-crc32-stream - * - * Copyright (c) 2014 Chris Talkington, contributors. - * Licensed under the MIT license. - * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT - */ -exports = module.exports = require('./crc32-stream'); -exports.CRC32Stream = exports; -exports.DeflateCRC32Stream = require('./deflate-crc32-stream'); \ No newline at end of file -- cgit v1.2.3