code: private Page createPageWithExtractedDictionary(Page page)
      {
          Block[] blocks = new Block[page.getChannelCount()];
          Block dictionary = ((DictionaryBlock) page.getBlock(channels[0])).getDictionary();
  
          // extract data dictionary
          blocks[channels[0]] = dictionary;
  
          // extract hash dictionary
          if (inputHashChannel.isPresent()) {
              blocks[inputHashChannel.get()] = ((DictionaryBlock) page.getBlock(inputHashChannel.get())).getDictionary();
          }
  
          return new Page(dictionary.getPositionCount(), blocks);
      }
docs: From Page(DictionaryBlock1, DictionaryBlock2) create new page with Page(dictionary1, dictionary2)