fix: error "reading unsigned" at start-time
Massimo Melina committed
Sep 3, 2022 at 22:52 UTC
f66805e863036b838deaa43f0100ac0d5f8890d9
1 file changed
+2
-2
src/QuickZipStream.ts
+2
-2
@@ -2,7 +2,7 @@
2
3
import { Readable } from 'stream'
4
// @ts-ignore
5
-import { crc32 as crc32lib } from 'buffer-crc32'
5
+import { unsigned } from 'buffer-crc32'
6
import assert from 'assert'
7
8
const ZIP64_SIZE_LIMIT = 0xffffffff
@@ -11,7 +11,7 @@ const ZIP64_NUMBER_LIMIT = 0xffff
11
let crc32function: (input: string | Buffer, initialState?: number | undefined | null) => number
12
import('@node-rs/crc32').then(lib => crc32function = lib.crc32, () => {
13
console.log('using generic lib for crc32')
14
- return crc32function = crc32lib.unsigned
14
+ crc32function = unsigned
15
})
16
17
const FLAGS = 0x0808 // bit3 = no crc in local header + bit11 = utf8