MCPcopy Create free account
hub / github.com/VJBots/VJ-Forward-Bot / encode_file_id

Function encode_file_id

plugins/unequeify.py:34–48  ·  view source on GitHub ↗
(s: bytes)

Source from the content-addressed store, hash-verified

32# Ask Doubt on telegram @KingVJ01
33
34def 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

Callers 1

unpack_new_file_idFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected