TelegramByLeo/EnumReg/T.mqh

236 라인
6.7 KiB
MQL5

2026-07-06 07:22:01 -05:00
//+-------------------------------------------------------------------+
2026-09-23 16:35:15 -05:00
//| Include generated by the PerfectHash SimPHash tool |
//| This tool is part of the TSN ecosystem |
//| Repository: https://forge.mql5.io/nique_372/SimPHash |
2026-07-06 07:22:01 -05:00
//+-------------------------------------------------------------------+
#property copyright "Copyright 2026, Niquel Mendoza"
#property link "https://www.mql5.com/"
#property strict
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
#include <TSN/Tables/AllHashes.mqh>
#ifndef TELEGRAMBYLEO_ENUMERG_T_MQH
#define TELEGRAMBYLEO_ENUMERG_T_MQH
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
2026-09-23 16:35:15 -05:00
#define TELEGRAMBYLEO_ENUMREG_FINALT_SIZE (64ULL)
#define TELEGRAMBYLEO_ENUMREG_FINALT_SIZE_LAST (63ULL)
#define TELEGRAMBYLEO_ENUMREG_BUCKETT_SIZE (32ULL)
#define TELEGRAMBYLEO_ENUMREG_BUCKETT_SIZE_LAST (31ULL)
2026-07-06 07:22:01 -05:00
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
namespace TSN
{
2026-09-05 10:19:58 -05:00
const ulong g_telegrambyleo_enumreg_seeds[TELEGRAMBYLEO_ENUMREG_BUCKETT_SIZE] =
{
0ULL,
2026-09-23 16:35:15 -05:00
0ULL,
1ULL,
0ULL,
0ULL,
0ULL,
2026-09-05 10:19:58 -05:00
3ULL,
2026-09-23 16:35:15 -05:00
0ULL,
0ULL,
0ULL,
2026-09-05 10:19:58 -05:00
1ULL,
2026-09-23 16:35:15 -05:00
2ULL,
2026-09-05 10:19:58 -05:00
0ULL,
0ULL,
0ULL,
0ULL,
2026-09-23 16:35:15 -05:00
6ULL,
1ULL,
0ULL,
0ULL,
0ULL,
0ULL,
4ULL,
0ULL,
1ULL,
0ULL,
0ULL,
0ULL,
0ULL,
4ULL,
2ULL,
2026-09-05 10:19:58 -05:00
0ULL
};
2026-07-06 07:22:01 -05:00
2026-09-05 10:19:58 -05:00
const ulong g_telegrambyleo_enumreg_hashes[TELEGRAMBYLEO_ENUMREG_FINALT_SIZE] =
{
2026-09-23 16:35:15 -05:00
4069220389903530819ULL, // guest_message
0ULL, // invalid
5140229218111588175ULL, // TELEGRAMBYLEO_CHAT_ACTION_TYPING
0ULL, // invalid
0ULL, // invalid
17020024179110757480ULL, // managed_bot
12139869593857250260ULL, // subscription
0ULL, // invalid
0ULL, // invalid
0ULL, // invalid
4834500658673306444ULL, // pre_checkout_query
11991166763096335946ULL, // message_reaction_count
0ULL, // invalid
884845654213244475ULL, // business_message
0ULL, // invalid
2189184173655313061ULL, // my_chat_member
4327258529367655037ULL, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_VIDEO
0ULL, // invalid
0ULL, // invalid
13696566772734188574ULL, // deleted_business_messages
5476941735786121027ULL, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_DOCUMENT
2026-09-05 10:19:58 -05:00
0ULL, // invalid
2026-09-23 16:35:15 -05:00
10095046222319616568ULL, // poll
4169452520160169091ULL, // chosen_inline_result
9040503993443901076ULL, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_AUDIO
11333720893619826495ULL, // TELEGRAMBYLEO_CHAT_ACTION_FIND_LOCATION
9148122417001063044ULL, // update_id
6907367085484285300ULL, // edited_message
15027863865977969126ULL, // message_reaction
2026-09-05 10:19:58 -05:00
0ULL, // invalid
2026-09-23 16:35:15 -05:00
2950633111455615890ULL, // removed_chat_boost
2026-09-05 10:19:58 -05:00
0ULL, // invalid
2026-09-23 16:35:15 -05:00
17435724213648946217ULL, // callback_query
2026-09-05 10:19:58 -05:00
0ULL, // invalid
2026-09-23 16:35:15 -05:00
2465153380165903551ULL, // poll_answer
15297677546206122065ULL, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_VIDEO
0ULL, // invalid
6139412411539458419ULL, // channel_post
0ULL, // invalid
7397504510689900816ULL, // shipping_query
7995434820618359395ULL, // edited_channel_post
0ULL, // invalid
8678109522669322774ULL, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_VIDEO_NOTE
7889091425768001102ULL, // chat_member
2026-09-05 10:19:58 -05:00
6199444767666851644ULL, // TELEGRAM_PARSE_MODE_HTML
2026-09-23 16:35:15 -05:00
15414159611589716683ULL, // edited_business_message
2026-09-05 10:19:58 -05:00
14969389322952118997ULL, // TELEGRAM_PARSE_MODE_MD_2
2026-09-23 16:35:15 -05:00
0ULL, // invalid
8067389765178264556ULL, // business_connection
9891619331685048536ULL, // TELEGRAM_PARSE_MODE_MD
4771997225182184990ULL, // chat_join_request
16021405886021492167ULL, // chat_boost
1710364158030292405ULL, // stopped_message_generation
2893656357084975234ULL, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_VIDEO_NOTE
789134386647812199ULL, // inline_query
10215296991616182886ULL, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_PHOTO
0ULL, // invalid
5270207831128086408ULL, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_AUDIO
0ULL, // invalid
5808526865678067722ULL, // purchased_paid_media
17520623205922891706ULL, // TELEGRAMBYLEO_CHAT_ACTION_CHOOSE_STIKER
0ULL, // invalid
6080987277291999908ULL, // message
2026-09-05 10:19:58 -05:00
0ULL
};
2026-07-06 07:22:01 -05:00
2026-09-05 10:19:58 -05:00
const long g_telegrambyleo_enumreg_values[TELEGRAMBYLEO_ENUMREG_FINALT_SIZE] =
{
2026-09-23 16:35:15 -05:00
9, // guest_message
-1,
0, // TELEGRAMBYLEO_CHAT_ACTION_TYPING
-1,
-1,
25, // managed_bot
26, // subscription
-1,
-1,
2026-09-05 10:19:58 -05:00
-1,
2026-09-23 16:35:15 -05:00
16, // pre_checkout_query
11, // message_reaction_count
2026-09-05 10:19:58 -05:00
-1,
2026-09-23 16:35:15 -05:00
6, // business_message
2026-09-05 10:19:58 -05:00
-1,
2026-09-23 16:35:15 -05:00
20, // my_chat_member
3, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_VIDEO
2026-09-05 10:19:58 -05:00
-1,
2026-09-23 16:35:15 -05:00
-1,
8, // deleted_business_messages
6, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_DOCUMENT
-1,
18, // poll
13, // chosen_inline_result
4, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_AUDIO
8, // TELEGRAMBYLEO_CHAT_ACTION_FIND_LOCATION
0, // update_id
2, // edited_message
10, // message_reaction
-1,
24, // removed_chat_boost
-1,
14, // callback_query
-1,
19, // poll_answer
2, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_VIDEO
-1,
3, // channel_post
-1,
15, // shipping_query
4, // edited_channel_post
-1,
9, // TELEGRAMBYLEO_CHAT_ACTION_RECORD_VIDEO_NOTE
21, // chat_member
2026-09-05 10:19:58 -05:00
0, // TELEGRAM_PARSE_MODE_HTML
2026-09-23 16:35:15 -05:00
7, // edited_business_message
2026-09-05 10:19:58 -05:00
2, // TELEGRAM_PARSE_MODE_MD_2
2026-09-23 16:35:15 -05:00
-1,
5, // business_connection
1, // TELEGRAM_PARSE_MODE_MD
22, // chat_join_request
23, // chat_boost
27, // stopped_message_generation
10, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_VIDEO_NOTE
12, // inline_query
1, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_PHOTO
-1,
5, // TELEGRAMBYLEO_CHAT_ACTION_UPLOAD_AUDIO
-1,
17, // purchased_paid_media
7, // TELEGRAMBYLEO_CHAT_ACTION_CHOOSE_STIKER
-1,
1, // message
2026-09-05 10:19:58 -05:00
-1
};
2026-07-06 07:22:01 -05:00
/*
long TelegramByLeoHashExt(const string& key)
{
//---
const int len = StringLen(key);
ulong key_hash = 14695981039346656037ULL;
FNV1a_64_AsM_Str(key, len, key_hash, 1099511628211ULL)
2026-09-05 10:19:58 -05:00
const int seed_index = int(key_hash & TELEGRAMBYLEO_ENUMREG_BUCKETT_SIZE_LAST);
2026-07-06 07:22:01 -05:00
//---
ulong h = key_hash + g_telegrambyleo_enumreg_seeds[seed_index] * 0x9e3779b97f4a7c15;
h = (h ^ (h >> 30)) * 0xbf58476d1ce4e5b9;
h = (h ^ (h >> 27)) * 0x94d049bb133111eb;
h ^= (h >> 31);
2026-09-05 10:19:58 -05:00
const int fi = int(h & TELEGRAMBYLEO_ENUMREG_FINALT_SIZE_LAST);
2026-07-06 07:22:01 -05:00
return g_telegrambyleo_enumreg_hashes[fi] == key_hash ? g_telegrambyleo_enumreg_values[fi] : -1;
}
long TelegramByLeoHashExt(const ulong key_hash)
{
2026-09-05 10:19:58 -05:00
const int seed_index = int(key_hash & TELEGRAMBYLEO_ENUMREG_BUCKETT_SIZE_LAST);
2026-07-06 07:22:01 -05:00
//---
ulong h = key_hash + g_telegrambyleo_enumreg_seeds[seed_index] * 0x9e3779b97f4a7c15;
h = (h ^ (h >> 30)) * 0xbf58476d1ce4e5b9;
h = (h ^ (h >> 27)) * 0x94d049bb133111eb;
h ^= (h >> 31);
2026-09-05 10:19:58 -05:00
const int fi = int(h & TELEGRAMBYLEO_ENUMREG_FINALT_SIZE_LAST);
2026-07-06 07:22:01 -05:00
return g_telegrambyleo_enumreg_hashes[fi] == key_hash ? g_telegrambyleo_enumreg_values[fi] : -1;
}
*/
}
2026-09-23 16:35:15 -05:00
#endif // TELEGRAMBYLEO_ENUMERG_T_MQH