docs: private Area readRegion(DataInput pStream, Rectangle pBounds) throws IOException {
          // Get region data size
          int size = pStream.readUnsignedShort();
  
          // Get region bounds
          readRectangle(pStream, pBounds);
  
          int count = (size - 10) / 2;
  
          if (count == 0) {
              // Minimal region, just the bounds
              return new Area(pBounds);
          }
          else {
              // Normal region, parse inversion points and build area
              Area area = new Area();
  
              boolean nextIsVertical = true;
  
              int x, y = 0;
              for (int i = 0; i < count; i++) {
                  short point = pStream.readShort();
  
                  if (nextIsVertical) {
                      if (point == 0x7fff) {
                          // Done
                          break;
                      }
  
                      y = point;
                      nextIsVertical = false;
                  }
                  else {
                      if (point == 0x7fff) {
                          nextIsVertical = true;
                          continue;
                      }
  
                      x = point;
                      area.exclusiveOr(new Area(new Rectangle(x, y, pBounds.x + pBounds.width - x, pBounds.y + pBounds.height - y)));
                  }
              }
  
              if (!pBounds.contains(area.getBounds())) {
                  processWarningOccurred("Bad region, contains point(s) out of bounds " + pBounds + ": " + area);
              }
  
              return area;
          }
      }