All files / src/error-correction qr-ec-block-table.constants.js

100% Statements 53/53
100% Branches 0/0
100% Functions 0/0
100% Lines 53/53

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 541x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
/* eslint @stylistic/no-multi-spaces: 0 -- tabular view of data present */
/**
 * The error correction block table.
 *
 * There are 2 elements per version and EC level, in groups of 3. The first number indicates EC width¹, then number of blocks.
 *
 * ¹ EC width - Error correction codewords count
 */
 
export const EC_BLOCK_TABLE = Object.freeze([
  // EC          M (bit 00)  L (bit 01)  H (bit 10)  Q (bit 11 )
  /* Version */
  /*    1    */  10, 1,       7,  1,     17, 1,        13, 1,
  /*    2    */  16, 1,       10, 1,     28, 1,        22, 1,
  /*    3    */  26, 1,       15, 1,     22, 2,        18, 2,
  /*    4    */  18, 2,       20, 1,     16, 4,        26, 2,
  /*    5    */  24, 2,       26, 1,     22, 4,        18, 4,
  /*    6    */  16, 4,       18, 2,     28, 4,        24, 4,
  /*    7    */  18, 4,       20, 2,     26, 5,        18, 6,
  /*    8    */  22, 4,       24, 2,     26, 6,        22, 6,
  /*    9    */  22, 5,       30, 2,     24, 8,        20, 8,
  /*   10    */  26, 5,       18, 4,     28, 8,        24, 8,
  /*   11    */  30, 5,       20, 4,     24, 11,       28, 8,
  /*   12    */  22, 8,       24, 4,     28, 11,       26, 10,
  /*   13    */  22, 9,       26, 4,     22, 16,       24, 12,
  /*   14    */  24, 9,       30, 4,     24, 16,       20, 16,
  /*   15    */  24, 10,      22, 6,     24, 18,       30, 12,
  /*   16    */  28, 10,      24, 6,     30, 16,       24, 17,
  /*   17    */  28, 11,      28, 6,     28, 19,       28, 16,
  /*   18    */  26, 13,      30, 6,     28, 21,       28, 18,
  /*   19    */  26, 14,      28, 7,     26, 25,       26, 21,
  /*   20    */  26, 16,      28, 8,     28, 25,       30, 20,
  /*   21    */  26, 17,      28, 8,     30, 25,       28, 23,
  /*   22    */  28, 17,      28, 9,     24, 34,       30, 23,
  /*   23    */  28, 18,      30, 9,     30, 30,       30, 25,
  /*   24    */  28, 20,      30, 10,    30, 32,       30, 27,
  /*   25    */  28, 21,      26, 12,    30, 35,       30, 29,
  /*   26    */  28, 23,      28, 12,    30, 37,       28, 34,
  /*   27    */  28, 25,      30, 12,    30, 40,       30, 34,
  /*   28    */  28, 26,      30, 13,    30, 42,       30, 35,
  /*   29    */  28, 28,      30, 14,    30, 45,       30, 38,
  /*   30    */  28, 29,      30, 15,    30, 48,       30, 40,
  /*   31    */  28, 31,      30, 16,    30, 51,       30, 43,
  /*   32    */  28, 33,      30, 17,    30, 54,       30, 45,
  /*   33    */  28, 35,      30, 18,    30, 57,       30, 48,
  /*   34    */  28, 37,      30, 19,    30, 60,       30, 51,
  /*   35    */  28, 38,      30, 19,    30, 63,       30, 53,
  /*   36    */  28, 40,      30, 20,    30, 66,       30, 56,
  /*   37    */  28, 43,      30, 21,    30, 70,       30, 59,
  /*   38    */  28, 45,      30, 22,    30, 74,       30, 62,
  /*   39    */  28, 47,      30, 24,    30, 77,       30, 65,
  /*   40    */  28, 49,      30, 25,    30, 81,       30, 68,
])