This commit is contained in:
root
2025-11-25 09:56:15 +03:00
commit 68c8f0e80d
23717 changed files with 3200521 additions and 0 deletions

59
mc_test/node_modules/crc32-stream/CHANGELOG.md generated vendored Executable file
View File

@ -0,0 +1,59 @@
## Changelog
**4.0.3**<small>_September 2, 2023_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/4.0.2...4.0.3)
**4.0.2**<small>_February 3, 2021_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/4.0.1...4.0.2)
### Bug Fixes
- fix DeflateCRC32Stream to support Node.js 15.6.0+ (#31) (#32)
### Maintenance
- Bump actions/setup-node from v2.1.2 to v2.1.4 (#30)
**4.0.1**<small>_November 18, 2020_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/4.0.0...4.0.1)
### Bug Fixes
- use crc-32 rather than crc module (#28)
### Maintenance
- Bump mocha from 8.2.0 to 8.2.1 (#25)
- Bump actions/checkout from v2.3.2 to v2.3.4 (#26)
- Bump actions/setup-node from v2.1.1 to v2.1.2 (#23)
- Bump mocha from 8.1.1 to 8.2.0 (#24)
- Bump mocha from 8.1.0 to 8.1.1 (#18)
- Bump actions/checkout from v2.3.1 to v2.3.2 (#19)
- Bump mocha from 8.0.1 to 8.1.0 (#17)
- Bump actions/setup-node from v2.1.0 to v2.1.1 (#16)
**4.0.0**<small>_July 18, 2020_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/3.0.1...4.0.0)
* Bump actions/checkout from v1 to v2.3.1 (#13) @dependabot
* Bump readable-stream from 3.4.0 to 3.6.0 (#15) @dependabot
* Bump mocha from 6.2.0 to 8.0.1 (#14) @dependabot
* Bump actions/setup-node from v1 to v2.1.0 (#12) @dependabot
* remove support for node < 10 (#11) @ctalkington
**3.0.1** <small>_August 2, 2019_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/3.0.0...3.0.1)
- update dependencies
**3.0.0**<small>_April 29, 2019_</small> — [Diff](https://github.com/archiverjs/node-crc32-stream/compare/2.0.0...3.0.0)
- Require Node.js 6.9, update dependencies, use modern JS syntax (GH #10)
- Do not use the deprecated Buffer() constructor (GH #8)
- remove node v0.10 and v0.12 support
**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)
- Switch to node-crc for performance (GH #3)
- bump deps to ensure latest versions are used.
[Release Archive](https://github.com/archiverjs/node-crc32-stream/releases)

22
mc_test/node_modules/crc32-stream/LICENSE generated vendored Executable file
View File

@ -0,0 +1,22 @@
Copyright (c) 2014 Chris Talkington, contributors.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

79
mc_test/node_modules/crc32-stream/README.md generated vendored Executable file
View File

@ -0,0 +1,79 @@
# CRC32 Stream
crc32-stream is a streaming CRC32 checksumer. It uses the [crc](https://www.npmjs.org/package/crc) module behind the scenes to reliably handle binary data and fancy character sets. Data is passed through untouched.
### Install
```bash
npm install crc32-stream --save
```
You can also use `npm install https://github.com/archiverjs/node-crc32-stream/archive/master.tar.gz` to test upcoming versions.
### Usage
#### CRC32Stream
Inherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) options and methods.
```js
const {CRC32Stream} = require('crc32-stream');
const source = fs.createReadStream('file.txt');
const checksum = new CRC32Stream();
checksum.on('end', function(err) {
// do something with checksum.digest() here
});
// either pipe it
source.pipe(checksum);
// or write it
checksum.write('string');
checksum.end();
```
#### DeflateCRC32Stream
Inherits [zlib.DeflateRaw](http://nodejs.org/api/zlib.html#zlib_class_zlib_deflateraw) options and methods.
```js
const {DeflateCRC32Stream} = require('crc32-stream');
const source = fs.createReadStream('file.txt');
const checksum = new DeflateCRC32Stream();
checksum.on('end', function(err) {
// do something with checksum.digest() here
});
// either pipe it
source.pipe(checksum);
// or write it
checksum.write('string');
checksum.end();
```
### Instance API
#### digest()
Returns the checksum digest in unsigned form.
#### hex()
Returns the hexadecimal representation of the checksum digest. (ie E81722F0)
#### size(compressed)
Returns the raw size/length of passed-through data.
If `compressed` is `true`, it returns compressed length instead. (DeflateCRC32Stream)
## Things of Interest
- [Changelog](https://github.com/archiverjs/node-crc32-stream/releases)
- [Contributing](https://github.com/archiverjs/node-crc32-stream/blob/master/CONTRIBUTING.md)
- [MIT License](https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT)

48
mc_test/node_modules/crc32-stream/lib/crc32-stream.js generated vendored Executable file
View File

@ -0,0 +1,48 @@
/**
* 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
*/
'use strict';
const {Transform} = require('readable-stream');
const crc32 = require('crc-32');
class CRC32Stream extends Transform {
constructor(options) {
super(options);
this.checksum = Buffer.allocUnsafe(4);
this.checksum.writeInt32BE(0, 0);
this.rawSize = 0;
}
_transform(chunk, encoding, callback) {
if (chunk) {
this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
this.rawSize += chunk.length;
}
callback(null, chunk);
}
digest(encoding) {
const checksum = Buffer.allocUnsafe(4);
checksum.writeUInt32BE(this.checksum >>> 0, 0);
return encoding ? checksum.toString(encoding) : checksum;
}
hex() {
return this.digest('hex').toUpperCase();
}
size() {
return this.rawSize;
}
}
module.exports = CRC32Stream;

View File

@ -0,0 +1,62 @@
/**
* 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
*/
'use strict';
const {DeflateRaw} = require('zlib');
const crc32 = require('crc-32');
class DeflateCRC32Stream extends DeflateRaw {
constructor(options) {
super(options);
this.checksum = Buffer.allocUnsafe(4);
this.checksum.writeInt32BE(0, 0);
this.rawSize = 0;
this.compressedSize = 0;
}
push(chunk, encoding) {
if (chunk) {
this.compressedSize += chunk.length;
}
return super.push(chunk, encoding);
}
_transform(chunk, encoding, callback) {
if (chunk) {
this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
this.rawSize += chunk.length;
}
super._transform(chunk, encoding, callback)
}
digest(encoding) {
const checksum = Buffer.allocUnsafe(4);
checksum.writeUInt32BE(this.checksum >>> 0, 0);
return encoding ? checksum.toString(encoding) : checksum;
}
hex() {
return this.digest('hex').toUpperCase();
}
size(compressed = false) {
if (compressed) {
return this.compressedSize;
} else {
return this.rawSize;
}
}
}
module.exports = DeflateCRC32Stream;

14
mc_test/node_modules/crc32-stream/lib/index.js generated vendored Executable file
View File

@ -0,0 +1,14 @@
/**
* 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
*/
'use strict';
module.exports = {
CRC32Stream: require('./crc32-stream'),
DeflateCRC32Stream: require('./deflate-crc32-stream')
}

45
mc_test/node_modules/crc32-stream/package.json generated vendored Executable file
View File

@ -0,0 +1,45 @@
{
"name": "crc32-stream",
"version": "4.0.3",
"description": "a streaming CRC32 checksumer",
"homepage": "https://github.com/archiverjs/node-crc32-stream",
"author": {
"name": "Chris Talkington",
"url": "http://christalkington.com/"
},
"repository": {
"type": "git",
"url": "https://github.com/archiverjs/node-crc32-stream.git"
},
"bugs": {
"url": "https://github.com/archiverjs/node-crc32-stream/issues"
},
"license": "MIT",
"main": "lib/index.js",
"files": [
"lib"
],
"engines": {
"node": ">= 10"
},
"scripts": {
"test": "mocha --reporter dot"
},
"dependencies": {
"crc-32": "^1.2.0",
"readable-stream": "^3.4.0"
},
"devDependencies": {
"chai": "4.3.8",
"mocha": "9.2.2"
},
"keywords": [
"crc32-stream",
"crc32",
"stream",
"checksum"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}