static BlobReadOptions fromBytes(DataInputStream stream, StoreKeyFactory factory, Log log) throws IOException {
    short version = stream.readShort();
    switch (version) {
      case VERSION_0:
        // backwards compatibility
        Offset offset = new Offset(log.getFirstSegment().getName(), stream.readLong());
        long size = stream.readLong();
        long expiresAtMs = stream.readLong();
        StoreKey key = factory.getStoreKey(stream);
        return new BlobReadOptions(log, offset,
            new MessageInfo(key, size, expiresAtMs, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID,
                Utils.Infinite_Time));
      case VERSION_1:
        offset = Offset.fromBytes(stream);
        size = stream.readLong();
        expiresAtMs = stream.readLong();
        key = factory.getStoreKey(stream);
        return new BlobReadOptions(log, offset,
            new MessageInfo(key, size, expiresAtMs, Account.UNKNOWN_ACCOUNT_ID, Container.UNKNOWN_CONTAINER_ID,
                Utils.Infinite_Time));
      default:
        throw new IOException("Unknown version encountered for BlobReadOptions");
    }
  }
Deserialized the stream to form {@link BlobReadOptions}
Note: Some fields are not serialized like accountId, containerId and crc and hence will take up defaults or null
after deserialization
@param stream the {@link DataInputStream} to deserialize
@param factory {@link StoreKeyFactory} to use
@param log the {@link Log} to use
@return the {@link BlobReadOptions} thus deserialized from the {@code stream}
@throws IOException
ambry-store/src/main/java/com/github/ambry/store/StoreMessageReadSet.java