default Offset readOffsetPosition(DataInputDeserializer in) throws IOException {
        boolean offsetNonNull = in.readBoolean();
        if (offsetNonNull) {
            int offsetBytesLength = in.readInt();
            byte[] offsetBytes = new byte[offsetBytesLength];
            in.readFully(offsetBytes);
            OffsetDeserializer offsetDeserializer = createOffsetDeserializer();
            return offsetDeserializer.deserialize(offsetBytes);
        } else {
            return null;
        }
    }
read {@link Offset} from input stream and write {@link Offset} to output stream.
Copy from com.ververica:flink-cdc-base:2.3.0.
inlong-sort/sort-flink/cdc-base/src/main/java/org/apache/inlong/sort/cdc/base/source/meta/offset/OffsetDeserializerSerializer.java