Telegram Group & Telegram Channel
Оптимизируем кодирование u128 в base62

В процессе работы над своим приложением для заметок, когда я дошел до сохранения данных в базу данных я стал использовать для идентификации записей uuid4 идентификаторы, которые обычно выглядят примерно так, когда представлены в виде строки:
32dca18531a1435480461f99837a5b1d

По некоторым причинам использовать uuid мне не очень нравилось:
это довольно длинная строка из 32 символов, а мне надо будет иногда показывать ее пользователям
6 бит в uuid4 не используются, это константы, расточительно

константные биты в uuid4:
uuid.uuid4().bytes[6] & 0b11110000 # == 64
uuid.uuid4().bytes[8] & 0b11000000 # == 128


https://habr.com/ru/articles/739936/

👉 @rust_lib



tg-me.com/rust_lib/142
Create:
Last Update:

Оптимизируем кодирование u128 в base62

В процессе работы над своим приложением для заметок, когда я дошел до сохранения данных в базу данных я стал использовать для идентификации записей uuid4 идентификаторы, которые обычно выглядят примерно так, когда представлены в виде строки:
32dca18531a1435480461f99837a5b1d

По некоторым причинам использовать uuid мне не очень нравилось:
это довольно длинная строка из 32 символов, а мне надо будет иногда показывать ее пользователям
6 бит в uuid4 не используются, это константы, расточительно

константные биты в uuid4:
uuid.uuid4().bytes[6] & 0b11110000 # == 64
uuid.uuid4().bytes[8] & 0b11000000 # == 128


https://habr.com/ru/articles/739936/

👉 @rust_lib

BY Rust




Share with your friend now:
tg-me.com/rust_lib/142

View MORE
Open in Telegram


Rust Telegram | DID YOU KNOW?

Date: |

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Rust from br


Telegram Rust
FROM USA