private byte[] encodeLocationMetadata(final long firstLogIndex, final int pos) {
        final byte[] newData = new byte[LOCATION_METADATA_SIZE];
        System.arraycopy(SegmentFile.RECORD_MAGIC_BYTES, 0, newData, 0, SegmentFile.RECORD_MAGIC_BYTES_SIZE);
        // 2 bytes reserved
        Bits.putLong(newData, SegmentFile.RECORD_MAGIC_BYTES_SIZE + 2, firstLogIndex);
        Bits.putInt(newData, SegmentFile.RECORD_MAGIC_BYTES_SIZE + 2 + 8, pos);
        return newData;
    }
Encode segment file firstLogIndex(fileName) and position to a byte array in the format of:
<ul>
 <li> magic bytes(2 B)</li>
 <li> reserved (2 B)</li>
 <li> firstLogIndex(8 B)</li>
 <li> wrote position(4 B)</li>
</ul>
@param firstLogIndex the first log index
@param pos           the wrote position
@return segment info
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/RocksDBSegmentLogStorage.java