Documentation - v0.27.2
    Preparing search index...

    Function downloadChunk

    • Download a single chunk of a file, using precise download mode

      Parameters

      • client: ITelegramClient
      • params: {
            abortSignal?: AbortSignal;
            dcId?: number;
            floodSleepThreshold?: number;
            limit: number;
            location: FileDownloadLocation;
            maxRetryCount?: number;
            offset: number;
        }

        Download parameters

        • OptionalabortSignal?: AbortSignal
        • OptionaldcId?: number

          DC id from which the file will be downloaded.

          If provided DC is not the one storing the file, redirection will be handled automatically.

        • OptionalfloodSleepThreshold?: number
        • limit: number

          Number of bytes to download (starting from the offset)

          Max 1MB (1048576)

        • location: FileDownloadLocation

          File from which to download a chunk

        • OptionalmaxRetryCount?: number
        • offset: number

          Offset of the chunk in bytes

      Returns Promise<Uint8Array<ArrayBufferLike>>