GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — zlib: expose zlib.crc32() by joyeecheung · Pull Request #52692 · nodejs/node Conversation
|
|
Wouldn't it be better to expose it under Edit: On second thought, maybe not. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
It's not a cryptographic hash, but a checksum. I was thinking about copying the python documentation (python also puts it on zlib):
(Not sure if it's okay to copy other documentation, but if we have to write one from scratch it wouldn't be too different anyway?) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I had the exact same thought process.
I agree this documentation bit or something to its effect is necessary to circumvent the same brain exercises myself and @lpinca went through :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The doc currently puts it as
Also, note that both Python and Ruby puts crc32 under a zlib module |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Failed to start CI⚠ Something was pushed to the Pull Request branch since the last approving review. ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/8848132665 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
huh, this is...amusing. I'll start from Jenkins. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Anna Henningsen <[email protected]>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This patch exposes the crc32() function from zlib to user-land.
It computes a 32-bit Cyclic Redundancy Check checksum of `data`. If
`value` is specified, it is used as the starting value of the checksum,
otherwise, 0 is used as the starting value.
```js
const zlib = require('node:zlib');
const { Buffer } = require('node:buffer');
let crc = zlib.crc32('hello'); // 907060870
crc = zlib.crc32('world', crc); // 4192936109
crc = zlib.crc32(Buffer.from('hello')); // 907060870
crc = zlib.crc32(Buffer.from('world'), crc); // 4192936109
```
PR-URL: #52692
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Notable changes:
cli:
* (SEMVER-MINOR) allow running wasm in limited vmem with
--disable-wasm-trap-handler (Joyee Cheung)
#52766
doc:
* add pimterry to collaborators (Tim Perry)
#52874
fs:
* (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
(Aviv Keller) #52837
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
#52734
lib,src:
* remove --experimental-policy (Rafael Gonzaga)
#52583
perf_hooks:
* (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
(Matthew Aitken) #51589
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig)
#52860
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
#52692
PR-URL: #52971
Notable changes:
cli:
* (SEMVER-MINOR) allow running wasm in limited vmem with
--disable-wasm-trap-handler (Joyee Cheung)
#52766
doc:
* add pimterry to collaborators (Tim Perry)
#52874
fs:
* (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
(Aviv Keller) #52837
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
#52734
lib,src:
* remove --experimental-policy (Rafael Gonzaga)
#52583
perf_hooks:
* (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
(Matthew Aitken) #51589
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig)
#52860
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
#52692
PR-URL: #52971
Notable changes:
cli:
* (SEMVER-MINOR) allow running wasm in limited vmem with
--disable-wasm-trap-handler (Joyee Cheung)
#52766
doc:
* add pimterry to collaborators (Tim Perry)
#52874
fs:
* (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
(Aviv Keller) #52837
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
#52734
lib,src:
* remove --experimental-policy (Rafael Gonzaga)
#52583
perf_hooks:
* (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
(Matthew Aitken) #51589
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig)
#52860
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
#52692
PR-URL: #52971
This patch exposes the crc32() function from zlib to user-land.
It computes a 32-bit Cyclic Redundancy Check checksum of `data`. If
`value` is specified, it is used as the starting value of the checksum,
otherwise, 0 is used as the starting value.
```js
const zlib = require('node:zlib');
const { Buffer } = require('node:buffer');
let crc = zlib.crc32('hello'); // 907060870
crc = zlib.crc32('world', crc); // 4192936109
crc = zlib.crc32(Buffer.from('hello')); // 907060870
crc = zlib.crc32(Buffer.from('world'), crc); // 4192936109
```
PR-URL: #52692
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Notable changes: doc: * add pimterry to collaborators (Tim Perry) #52874 inspector: * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) #52734 test_runner: * (SEMVER-MINOR) support test plans (Colin Ihrig) #52860 tools: * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) #52766 * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) #52766 * (SEMVER-MINOR) support != in test status files (Joyee Cheung) #52766 zlib: * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) #52692 PR-URL: #53486
Notable changes: doc: * add pimterry to collaborators (Tim Perry) #52874 inspector: * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) #52734 test_runner: * (SEMVER-MINOR) support test plans (Colin Ihrig) #52860 tools: * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) #52766 * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) #52766 * (SEMVER-MINOR) support != in test status files (Joyee Cheung) #52766 zlib: * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) #52692 PR-URL: #53486
Notable changes: doc: * add pimterry to collaborators (Tim Perry) #52874 inspector: * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) #52734 test_runner: * (SEMVER-MINOR) support test plans (Colin Ihrig) #52860 tools: * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) #52766 * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) #52766 * (SEMVER-MINOR) support != in test status files (Joyee Cheung) #52766 zlib: * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) #52692 PR-URL: #53486
Notable changes: doc: * add pimterry to collaborators (Tim Perry) #52874 inspector: * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) #52734 test_runner: * (SEMVER-MINOR) support test plans (Colin Ihrig) #52860 tools: * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) #52766 * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) #52766 * (SEMVER-MINOR) support != in test status files (Joyee Cheung) #52766 zlib: * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) #52692 PR-URL: #53486
This patch exposes the crc32() function from zlib to user-land.
It computes a 32-bit Cyclic Redundancy Check checksum of `data`. If
`value` is specified, it is used as the starting value of the checksum,
otherwise, 0 is used as the starting value.
```js
const zlib = require('node:zlib');
const { Buffer } = require('node:buffer');
let crc = zlib.crc32('hello'); // 907060870
crc = zlib.crc32('world', crc); // 4192936109
crc = zlib.crc32(Buffer.from('hello')); // 907060870
crc = zlib.crc32(Buffer.from('world'), crc); // 4192936109
```
PR-URL: nodejs#52692
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Notable changes:
cli:
* (SEMVER-MINOR) allow running wasm in limited vmem with
--disable-wasm-trap-handler (Joyee Cheung)
nodejs#52766
doc:
* add pimterry to collaborators (Tim Perry)
nodejs#52874
fs:
* (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
(Aviv Keller) nodejs#52837
inspector:
* (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
nodejs#52734
lib,src:
* remove --experimental-policy (Rafael Gonzaga)
nodejs#52583
perf_hooks:
* (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
(Matthew Aitken) nodejs#51589
test_runner:
* (SEMVER-MINOR) support test plans (Colin Ihrig)
nodejs#52860
zlib:
* (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
nodejs#52692
PR-URL: nodejs#52971
Notable changes: doc: * add pimterry to collaborators (Tim Perry) nodejs#52874 inspector: * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno) nodejs#52734 test_runner: * (SEMVER-MINOR) support test plans (Colin Ihrig) nodejs#52860 tools: * (SEMVER-MINOR) fix get_asan_state() in tools/test.py (Joyee Cheung) nodejs#52766 * (SEMVER-MINOR) support max_virtual_memory test configuration (Joyee Cheung) nodejs#52766 * (SEMVER-MINOR) support != in test status files (Joyee Cheung) nodejs#52766 zlib: * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung) nodejs#52692 PR-URL: nodejs#53486
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.