MCPcopy Create free account
hub / github.com/creatale/node-dv / updateHashChain

Function updateHashChain

deps/lodepng/lodepng.cpp:1462–1471  ·  view source on GitHub ↗

wpos = pos & (windowsize - 1)*/

Source from the content-addressed store, hash-verified

1460
1461/*wpos = pos & (windowsize - 1)*/
1462static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros)
1463{
1464 hash->val[wpos] = (int)hashval;
1465 if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval];
1466 hash->head[hashval] = (int)wpos;
1467
1468 hash->zeros[wpos] = numzeros;
1469 if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros];
1470 hash->headz[numzeros] = (int)wpos;
1471}
1472
1473/*
1474LZ77-encode the data. Return value is error code. The input are raw bytes, the output

Callers 1

encodeLZ77Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected