docs: private void extract(@NotNull final EpsDirectory directory, @NotNull Metadata metadata, @NotNull SequentialReader reader) throws IOException
      {
          StringBuilder line = new StringBuilder();
  
          while (true) {
              line.setLength(0);
  
              // Read the next line, excluding any trailing newline character
              // Note that for Windows-style line endings ("\r\n") the outer loop will be run a second time with an empty
              // string, which is fine.
              while (true) {
                  char c = (char)reader.getByte();
                  if (c == '\r' || c == '\n')
                      break;
                  line.append(c);
              }
  
              // Stop when we hit a line that is not a comment
              if (line.length() != 0 && line.charAt(0) != '%')
                  break;
  
              String name;
  
              // ':' signifies there is an associated keyword (should be put in directory)
              // otherwise, the name could be a marker
              int colonIndex = line.indexOf(":");
              if (colonIndex != -1) {
                  name = line.substring(0, colonIndex).trim();
                  String value = line.substring(colonIndex + 1).trim();
                  addToDirectory(directory, name, value);
              } else {
                  name = line.toString().trim();
              }
  
              // Some comments will both have a value and signify a new block to follow
              if (name.equals("%BeginPhotoshop")) {
                  extractPhotoshopData(metadata, reader);
              } else if (name.equals("%%BeginICCProfile")) {
                  extractIccData(metadata, reader);
              } else if (name.equals("%begin_xml_packet")) {
                  extractXmpData(metadata, reader);
              }
          }
      }