In leu of multiformats/js-multiformats#261 landing, this PR uses the nodejs crypto library to create a streaming sha256 hasher.
Before:
$ ipfs-car hash snow.car
node:internal/fs/promises:516
throw new ERR_FS_FILE_TOO_LARGE(size);
^
RangeError [ERR_FS_FILE_TOO_LARGE]: File size (11998084756) is greater than 2 GiB
at readFileHandle (node:internal/fs/promises:516:11)
at async Module.hash (file:///usr/local/lib/node_modules/ipfs-car/cmd/hash.js:13:13) {
code: 'ERR_FS_FILE_TOO_LARGE'
}
Node.js v20.11.0
After:
$ ipfs-car hash snow.car
bagbaierabdsb7q55nozng74qw267etolakl4jwrszyjb5elw43zercwmowva
(Note: snow.car is an 11GB CAR)
resolves storacha/ipfs-car#158
Originally posted by @alanshaw in storacha/ipfs-car#162
┆Issue is synchronized with this Jira Task
In leu of multiformats/js-multiformats#261 landing, this PR uses the nodejs crypto library to create a streaming sha256 hasher.
Before:
After:
(Note:
snow.caris an 11GB CAR)resolves storacha/ipfs-car#158
Originally posted by @alanshaw in storacha/ipfs-car#162
┆Issue is synchronized with this Jira Task