{
int crc = getChunkChecksum(type.getPersistentId(), slice.getRawArray(), slice.getRawOffset(), slice.length());
// Format the header
Slice header = Slices.allocate(HEADER_SIZE);
SliceOutput sliceOutput = header.output();
sliceOutput.writeInt(crc);
sliceOutput.writeByte((byte) (slice.length() & 0xff));
sliceOutput.writeByte((byte) (slice.length() >>> 8));
sliceOutput.writeByte((byte) (type.getPersistentId()));