private void putHeader(ByteBuff buff, int onDiskSize, int uncompressedSize,
      int onDiskDataSize) {
      buff.rewind();
      blockType.write(buff);
      buff.putInt(onDiskSize - HConstants.HFILEBLOCK_HEADER_SIZE);
      buff.putInt(uncompressedSize - HConstants.HFILEBLOCK_HEADER_SIZE);
      buff.putLong(prevOffset);
      buff.put(fileContext.getChecksumType().getCode());
      buff.putInt(fileContext.getBytesPerChecksum());
      buff.putInt(onDiskDataSize);
    }
Put the header into the given byte array at the given offset.
@param onDiskSize       size of the block on disk header + data + checksum
@param uncompressedSize size of the block after decompression (but before optional data block
                        decoding) including header
@param onDiskDataSize   size of the block on disk with header and data but not including the
                        checksums
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java