public boolean decode(final ByteBuffer buffer) {
            if (buffer == null || buffer.remaining() < INDEX_SIZE) {
                LOG.error("Fail to decode index entry , invalid buffer length: {}",
                    buffer == null ? 0 : buffer.remaining());
                return false;
            }
            final byte[] magic = new byte[1];
            buffer.get(magic);
            if (!Arrays.equals(magic, RECORD_MAGIC_BYTES)) {
                LOG.error("Fail to decode index entry, invalid buffer magic");
                return false;
            }
            this.logType = buffer.get();
            this.offset = buffer.getInt();
            this.position = buffer.getInt();
            return true;
        }
The offset entry of Index, including (1 byte magic, 4 bytes offset, 4 bytes position, 1 byte logType)
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/index/IndexFile.java