FileHash.deserialize constructor

FileHash.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory FileHash.deserialize(BinaryReader reader) {
  // Read [FileHash] fields.
  final offset = reader.readInt64();
  final limit = reader.readInt32();
  final hash = reader.readBytes();

  // Construct [FileHash] object.
  final returnValue = FileHash(offset: offset, limit: limit, hash: hash);

  // Now return the deserialized [FileHash].
  return returnValue;
}