Socket
Socket
Sign inDemoInstall

adler-32

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adler-32 - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

types/index.d.ts

7

adler32.js

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

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

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

}
/*eslint-enable */
/*jshint ignore:end */
}(function(ADLER32) {
ADLER32.version = '1.1.0';
ADLER32.version = '1.2.0';
function adler32_bstr(bstr, seed) {

@@ -86,5 +88,8 @@ var a = 1, b = 0, L = bstr.length, M = 0;

}
// $FlowIgnore
ADLER32.bstr = adler32_bstr;
// $FlowIgnore
ADLER32.buf = adler32_buf;
// $FlowIgnore
ADLER32.str = adler32_str;
}));

19

package.json
{
"name": "adler-32",
"version": "1.1.0",
"version": "1.2.0",
"author": "sheetjs",

@@ -11,2 +11,3 @@ "description": "Pure-JS ADLER-32",

"main": "./adler32",
"types": "types",
"dependencies": {

@@ -18,8 +19,15 @@ "printj":"~1.1.0",

"mocha":"~2.5.3",
"codepage":"~1.10.0"
"blanket": "~1.2.3",
"codepage":"~1.10.0",
"@sheetjs/uglify-js":"~2.7.3",
"@types/node":"^8.0.7",
"dtslint": "^0.1.2",
"typescript": "2.2.0"
},
"repository": { "type":"git", "url":"git://github.com/SheetJS/js-adler32.git" },
"scripts": {
"pretest": "git submodule init && git submodule update",
"test": "make test"
"test": "make test",
"build": "make",
"lint": "make fullint",
"dtslint": "dtslint types"
},

@@ -31,3 +39,4 @@ "config": {

},
"files": ["adler32.js", "bin/adler32.njs", "LICENSE", "README.md"],
"homepage": "http://sheetjs.com/opensource",
"files": ["adler32.js", "bin/adler32.njs", "LICENSE", "README.md", "types/index.d.ts", "types/*.json"],
"bugs": { "url": "https://github.com/SheetJS/js-adler32/issues" },

@@ -34,0 +43,0 @@ "license": "Apache-2.0",

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

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_ADLER`.
The script will manipulate `module.exports` if available . This is not always
desirable. To prevent the behavior, define `DO_NOT_EXPORT_ADLER`.

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

- `ADLER32.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).
- `ADLER32.bstr(binary string[, seed])` assumes the argument is a "binary" string
- `ADLER32.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`
- `ADLER32.str(string)` assumes the argument is a standard string and
- `ADLER32.str(string)` assumes the argument is a standard JS string and
calculates the hash of the UTF-8 encoding.

@@ -73,3 +72,3 @@

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

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

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

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

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

@@ -109,3 +108,3 @@ ```bash

Bit twiddling is much faster than taking the mod on Safari and older Firefoxes.
Bit twiddling is much faster than taking the mod in Safari and Firefox browsers.
Instead of taking the literal mod 65521, it is faster to keep it in the integers

@@ -131,3 +130,3 @@ by bit-shifting: `65536 ~ 15 mod 65521` so for nonnegative integer `a`:

Subtract up to 4 elements for the unicode case.
Subtract up to 4 elements for the Unicode case.

@@ -134,0 +133,0 @@ ## License

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