public static CompositeBlobInfo deserializeMetadataContentRecord(DataInputStream stream,
        StoreKeyFactory storeKeyFactory) throws IOException {
      List<Pair<StoreKey, Long>> keysAndContentSizes = new ArrayList<>();
      long totalSize = stream.readLong();
      long sum = 0;
      int numberOfKeys = stream.readInt();
      for (int i = 0; i < numberOfKeys; i++) {
        long contentSize = stream.readLong();
        StoreKey storeKey = storeKeyFactory.getStoreKey(stream);
        keysAndContentSizes.add(new Pair<>(storeKey, contentSize));
        sum += contentSize;
      }
      if (sum != totalSize) {
        throw new IllegalArgumentException("Key content sizes do not equal total size");
      }
      return new CompositeBlobInfo(keysAndContentSizes);
    }
Deserialize a metadata content record from a stream.
@param stream The stream to read the serialized record from.
@param storeKeyFactory The factory to use for parsing keys in the serialized metadata content record.
@return A {@link CompositeBlobInfo} object with the chunk size and list of keys from the record.
@throws IOException
ambry-messageformat/src/main/java/com/github/ambry/messageformat/MessageFormatRecord.java