docs: private void readModule(final ClassVisitor classVisitor,
              final Context context, int u,
              final String mainClass, int packages) {
  
          char[] buffer = context.buffer;
  
          // reads module name, flags and version
          String name = readModule(u, buffer);
          int flags = readUnsignedShort(u + 2);
          String version = readUTF8(u + 4, buffer);
          u += 6;
  
          ModuleVisitor mv = classVisitor.visitModule(name, flags, version);
          if (mv == null) {
              return;
          }
  
          // module attributes (main class, packages)
          if (mainClass != null) {
              mv.visitMainClass(mainClass);
          }
  
          if (packages != 0) {
              for (int i = readUnsignedShort(packages - 2); i > 0; --i) {
                  String packaze = readPackage(packages, buffer);
                  mv.visitPackage(packaze);
                  packages += 2;
              }
          }
  
          // reads requires
          u += 2;
          for (int i = readUnsignedShort(u - 2); i > 0; --i) {
              String module = readModule(u, buffer);
              int access = readUnsignedShort(u + 2);
              String requireVersion = readUTF8(u + 4, buffer);
              mv.visitRequire(module, access, requireVersion);
              u += 6;
          }
  
          // reads exports
          u += 2;
          for (int i = readUnsignedShort(u - 2); i > 0; --i) {
              String export = readPackage(u, buffer);
              int access = readUnsignedShort(u + 2);
              int exportToCount = readUnsignedShort(u + 4);
              u += 6;
              String[] tos = null;
              if (exportToCount != 0) {
                  tos = new String[exportToCount];
                  for (int j = 0; j < tos.length; ++j) {
                      tos[j] = readModule(u, buffer);
                      u += 2;
                  }
              }
              mv.visitExport(export, access, tos);
          }
  
          // reads opens
          u += 2;
          for (int i = readUnsignedShort(u - 2); i > 0; --i) {
              String open = readPackage(u, buffer);
              int access = readUnsignedShort(u + 2);
              int openToCount = readUnsignedShort(u + 4);
              u += 6;
              String[] tos = null;
              if (openToCount != 0) {
                  tos = new String[openToCount];
                  for (int j = 0; j < tos.length; ++j) {
                      tos[j] = readModule(u, buffer);
                      u += 2;
                  }
              }
              mv.visitOpen(open, access, tos);
          }
  
          // read uses
          u += 2;
          for (int i = readUnsignedShort(u - 2); i > 0; --i) {
              mv.visitUse(readClass(u, buffer));
              u += 2;
          }
  
          // read provides
          u += 2;
          for (int i = readUnsignedShort(u - 2); i > 0; --i) {
              String service = readClass(u, buffer);
              int provideWithCount = readUnsignedShort(u + 2);
              u += 4;
              String[] withs = new String[provideWithCount];
              for (int j = 0; j < withs.length; ++j) {
                  withs[j] = readClass(u, buffer);
                  u += 2;
              }
              mv.visitProvide(service, withs);
          }
  
          mv.visitEnd();
      }