MCPcopy Index your code
hub / github.com/google/brotli / checkDupes

Method checkDupes

java/org/brotli/dec/Decode.java:528–537  ·  view source on GitHub ↗
(State s, int[] symbols, int length)

Source from the content-addressed store, hash-verified

526 }
527
528 private static int checkDupes(State s, int[] symbols, int length) {
529 for (int i = 0; i < length - 1; ++i) {
530 for (int j = i + 1; j < length; ++j) {
531 if (symbols[i] == symbols[j]) {
532 return Utils.makeError(s, BROTLI_ERROR_DUPLICATE_SIMPLE_HUFFMAN_SYMBOL);
533 }
534 }
535 }
536 return BROTLI_OK;
537 }
538
539 /**
540 * Reads up to 4 symbols directly and applies predefined histograms.

Callers 1

readSimpleHuffmanCodeMethod · 0.95

Calls 1

makeErrorMethod · 0.95

Tested by

no test coverage detected