MCPcopy Create free account
hub / github.com/TruthHun/BookStack / makeTable

Function makeTable

static/word2md/mammoth.browser.js:18208–18220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18206
18207// Use ordinary array, since untyped makes no boost here
18208function makeTable() {
18209 var c, table = [];
18210
18211 for (var n = 0; n < 256; n++) {
18212 c = n;
18213 for (var k = 0; k < 8; k++) {
18214 c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
18215 }
18216 table[n] = c;
18217 }
18218
18219 return table;
18220}
18221
18222// Create table on load. Just 255 signed longs. Not a problem.
18223var crcTable = makeTable();

Callers 1

mammoth.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected