Skip to content

Instantly share code, notes, and snippets.

View yy16's full-sized avatar
🤒
Out sick

yy16

🤒
Out sick
View GitHub Profile
@yy16
yy16 / FastTelethon.py
Created August 17, 2024 06:21 — forked from painor/FastTelethon.py
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO