Socket
Socket
Sign inDemoInstall

crc-32

Package Overview
Dependencies
2
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

7

crc32.js

@@ -7,2 +7,3 @@ /* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */

/*jshint ignore:start */
/*eslint-disable */
if(typeof DO_NOT_EXPORT_CRC === 'undefined') {

@@ -23,5 +24,6 @@ if('object' === typeof exports) {

}
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32) {
CRC32.version = '1.1.1';
CRC32.version = '1.2.0';
/* see perf/crc32table.js */

@@ -112,5 +114,8 @@ /*global Int32Array */

CRC32.table = T;
// $FlowIgnore
CRC32.bstr = crc32_bstr;
// $FlowIgnore
CRC32.buf = crc32_buf;
// $FlowIgnore
CRC32.str = crc32_str;
}));

6

package.json
{
"name": "crc-32",
"version": "1.1.1",
"version": "1.2.0",
"author": "sheetjs",
"description": "Pure-JS CRC-32",
"keywords": [ "crc32", "checksum", "crc" ],
"keywords": [ "crc", "crc32", "checksum" ],
"bin": {

@@ -28,2 +28,4 @@ "crc32": "./bin/crc32.njs"

"test": "make test",
"build": "make",
"lint": "make fullint",
"dtslint": "dtslint types"

@@ -30,0 +32,0 @@ },

@@ -25,5 +25,4 @@ # crc32

The script will manipulate `module.exports` if available (e.g. in a CommonJS
`require` context). This is not always desirable. To prevent the behavior,
define `DO_NOT_EXPORT_CRC`.
The script will manipulate `module.exports` if available . This is not always
desirable. To prevent the behavior, define `DO_NOT_EXPORT_CRC`.

@@ -38,9 +37,9 @@ ## Usage

- `CRC32.buf(byte array or buffer[, seed])` assumes the argument is a sequence
of 8-bit unsigned integers (e.g. nodejs `Buffer` or simple array of ints).
of 8-bit unsigned integers (nodejs `Buffer`, `Uint8Array` or array of bytes).
- `CRC32.bstr(binary string[, seed])` assumes the argument is a "binary" string
- `CRC32.bstr(binary string[, seed])` assumes the argument is a binary string
where byte `i` is the low byte of the UCS-2 char: `str.charCodeAt(i) & 0xFF`
- `CRC32.str(string[, seed])` assumes the argument is a standard string and
calculates the CRC32 of the UTF-8 encoding.
- `CRC32.str(string[, seed])` assumes the argument is a standard JS string and
calculates the hash of the UTF-8 encoding.

@@ -73,3 +72,3 @@ For example:

To generate the bits file, use the `crc32` function from python zlib:
To generate the bits file, use the `crc32` function from python `zlib`:

@@ -87,3 +86,3 @@ ```python

The included `crc32.njs` script can process files or stdin:
The included `crc32.njs` script can process files or standard input:

@@ -96,3 +95,3 @@ ```bash

For comparison, the included `crc32.py` script uses python zlib:
For comparison, the included `crc32.py` script uses python `zlib`:

@@ -118,3 +117,3 @@ ```bash

[js-adler32](http://git.io/adler32) has more performance notes
The [`adler-32` project](http://git.io/adler32) has more performance notes

@@ -121,0 +120,0 @@ ## License

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc