docs: private String createDescriptor(boolean compact, int layers, int dataBlocks) {
  
          StringBuilder descriptor = new StringBuilder();
          int descDataSize;
  
          if (compact) {
              /* The first 2 bits represent the number of layers minus 1 */
              if (((layers - 1) & 0x02) != 0) {
                  descriptor.append('1');
              } else {
                  descriptor.append('0');
              }
              if (((layers - 1) & 0x01) != 0) {
                  descriptor.append('1');
              } else {
                  descriptor.append('0');
              }
              /* The next 6 bits represent the number of data blocks minus 1 */
              if (readerInit) {
                  descriptor.append('1');
              } else {
                  if (((dataBlocks - 1) & 0x20) != 0) {
                      descriptor.append('1');
                  } else {
                      descriptor.append('0');
                  }
              }
              for (int i = 0x10; i > 0; i = i >> 1) {
                  if (((dataBlocks - 1) & i) != 0) {
                      descriptor.append('1');
                  } else {
                      descriptor.append('0');
                  }
              }
              descDataSize = 2;
          } else {
              /* The first 5 bits represent the number of layers minus 1 */
              for (int i = 0x10; i > 0; i = i >> 1) {
                  if (((layers - 1) & i) != 0) {
                      descriptor.append('1');
                  } else {
                      descriptor.append('0');
                  }
              }
  
              /* The next 11 bits represent the number of data blocks minus 1 */
              if (readerInit) {
                  descriptor.append('1');
              } else {
                  if (((dataBlocks - 1) & 0x400) != 0) {
                      descriptor.append('1');
                  } else {
                      descriptor.append('0');
                  }
              }
              for (int i = 0x200; i > 0; i = i >> 1) {
                  if (((dataBlocks - 1) & i) != 0) {
                      descriptor.append('1');
                  } else {
                      descriptor.append('0');
                  }
              }
              descDataSize = 4;
          }
  
          encodeInfo += "Mode Message: " + descriptor + "\n";
  
          /* Split into 4-bit codewords */
          int[] desc_data = new int[descDataSize];
          for (int i = 0; i < descDataSize; i++) {
              for (int weight = 0; weight < 4; weight++) {
                  if (descriptor.charAt((i * 4) + weight) == '1') {
                      desc_data[i] += (8 >> weight);
                  }
              }
          }
  
          /* Add Reed-Solomon error correction with Galois Field GF(16) and prime modulus x^4 + x + 1 (Section 7.2.3) */
          ReedSolomon rs = new ReedSolomon();
          rs.init_gf(0x13);
          if (compact) {
              rs.init_code(5, 1);
              rs.encode(2, desc_data);
              int[] desc_ecc = new int[6];
              for (int i = 0; i < 5; i++) {
                  desc_ecc[i] = rs.getResult(i);
              }
              for (int i = 0; i < 5; i++) {
                  for (int weight = 0x08; weight > 0; weight = weight >> 1) {
                      if ((desc_ecc[4 - i] & weight) != 0) {
                          descriptor.append('1');
                      } else {
                          descriptor.append('0');
                      }
                  }
              }
          } else {
              rs.init_code(6, 1);
              rs.encode(4, desc_data);
              int[] desc_ecc = new int[6];
              for (int i = 0; i < 6; i++) {
                  desc_ecc[i] = rs.getResult(i);
              }
              for (int i = 0; i < 6; i++) {
                  for (int weight = 0x08; weight > 0; weight = weight >> 1) {
                      if ((desc_ecc[5 - i] & weight) != 0) {
                          descriptor.append('1');
                      } else {
                          descriptor.append('0');
                      }
                  }
              }
          }
  
          return descriptor.toString();
      }