From e2ac18b7bc76df56fab8aeee23f93d622aeea51a Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 9 Oct 2017 13:19:03 +0200 Subject: [PATCH] Use larger chunks when downloading/uploading files --- telethon/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/telethon/utils.py b/telethon/utils.py index 9c3ee2fe..9efc5ee5 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -378,11 +378,7 @@ def find_user_or_chat(peer, users, chats): def get_appropriated_part_size(file_size): """Gets the appropriated part size when uploading or downloading files, given an initial file size""" - if file_size <= 1048576: # 1MB - return 32 - if file_size <= 10485760: # 10MB - return 64 - if file_size <= 393216000: # 375MB + if file_size <= 104857600: # 100MB return 128 if file_size <= 786432000: # 750MB return 256