MCPcopy Create free account
hub / github.com/apache/fory / bodyOnlyHeaderHashBits

Function bodyOnlyHeaderHashBits

javascript/test/typemeta.test.ts:1591–1598  ·  view source on GitHub ↗
(buffer: Uint8Array)

Source from the content-addressed store, hash-verified

1589}
1590
1591function bodyOnlyHeaderHashBits(buffer: Uint8Array) {
1592 const hash = x64hash128(buffer, 47);
1593 let header = BigInt.asIntN(64, hash.getBigInt64(0, false) << HASH_SHIFT_BITS);
1594 if (header < 0n) {
1595 header = -header;
1596 }
1597 return BigInt.asUintN(64, header) & HEADER_HASH_MASK;
1598}

Callers 1

typemeta.test.tsFile · 0.85

Calls 1

x64hash128Function · 0.90

Tested by

no test coverage detected