(s: bytes)
| 32 | # Ask Doubt on telegram @KingVJ01 |
| 33 | |
| 34 | def encode_file_id(s: bytes) -> str: |
| 35 | r = b"" |
| 36 | n = 0 |
| 37 | |
| 38 | for i in s + bytes([22]) + bytes([4]): |
| 39 | if i == 0: |
| 40 | n += 1 |
| 41 | else: |
| 42 | if n: |
| 43 | r += b"\x00" + bytes([n]) |
| 44 | n = 0 |
| 45 | |
| 46 | r += bytes([i]) |
| 47 | |
| 48 | return base64.urlsafe_b64encode(r).decode().rstrip("=") |
| 49 | |
| 50 | # Don't Remove Credit Tg - @VJ_Botz |
| 51 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ |
no outgoing calls
no test coverage detected