Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011
  1. package utils
  2. type Uint24 [3]byte
  3. func ToUint24(number uint32) Uint24 {
  4. return Uint24{byte(number), byte(number >> 8), byte(number >> 16)}
  5. }
  6. func FromUint24(number Uint24) uint32 {
  7. return uint32(number[0]) + (uint32(number[1]) << 8) + (uint32(number[2]) << 16)
  8. }