UploadGetFile.deserialize constructor

UploadGetFile.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory UploadGetFile.deserialize(BinaryReader reader) {
  // Read [UploadGetFile] fields.
  final flags = reader.readInt32();
  final precise = (flags & 1) != 0;
  final cdnSupported = (flags & 2) != 0;
  final location = reader.readObject() as InputFileLocationBase;
  final offset = reader.readInt64();
  final limit = reader.readInt32();

  // Construct [UploadGetFile] object.
  final returnValue = UploadGetFile(
    precise: precise,
    cdnSupported: cdnSupported,
    location: location,
    offset: offset,
    limit: limit,
  );

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