code: void encode(ByteBuf out) {
          // Create optimised selector list and Huffman tables
          generateHuffmanOptimisationSeeds();
          for (int i = 3; i >= 0; i--) {
              optimiseSelectorsAndHuffmanTables(i == 0);
          }
          assignHuffmanCodeSymbols();
  
          // Write out the tables and the block data encoded with them
          writeSelectorsAndHuffmanTables(out);
          writeBlockData(out);
      }
docs: Encodes and writes the block data.