为什么 readBigInt64BE return 一个数字不等于它的原始十六进制值?

Why does readBigInt64BE return a number that is not equal to it's original hex value?

我有以下缓冲区:

<Buffer bf 58 e6 c6 00 8f fd 32 84 0f d1 d4 bd 7f ba 95 fa f1 b0 af cf 2a 54 43 49 f5 0f 42 e6 c3 60 e2 a5 1b 05 61 30 3a 75 50 42 60 ff ff 2e 57 d7 1f 8a da ... 269 more bytes>

为什么下面的不相等?

0xbf58e6c6008ffd32 //13788023997282124000
Number(buffer.readBigInt64BE(0)) // -4658720076427429000

不出所料,little endian版本returns另一个号也:

Number(buffer.readBigInt64LE(0)) // 3674250104503949300

0xbf58e6c6008ffd32 被认为是一个无符号整数(为什么,我不知道,我还需要弄清楚),所以我需要读取一个大的无符号 64 位整数(readBigUInt64BE 而不是 readBigInt64BE).