EncryptedFile.deserialize constructor

EncryptedFile.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory EncryptedFile.deserialize(BinaryReader reader) {
  // Read [EncryptedFile] fields.
  final id = reader.readInt64();
  final accessHash = reader.readInt64();
  final size = reader.readInt64();
  final dcId = reader.readInt32();
  final keyFingerprint = reader.readInt32();

  // Construct [EncryptedFile] object.
  final returnValue = EncryptedFile(
    id: id,
    accessHash: accessHash,
    size: size,
    dcId: dcId,
    keyFingerprint: keyFingerprint,
  );

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