Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML.
Из плюсов такого подхода стоит отметить вот что:
🔸 готовый, повсеместно используемый и поддерживаемый формат
🔸 простой и понятный файл, удобочитаемый для человека
🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек
Но есть и минусы
🔹 затраты времени при записи файла (кодирование данных в нужный формат строки)
🔹 затраты времени при чтении файла (декодирование данных в Python объекты)
🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...)
🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда)
🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные
Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи.
Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳.
🔸 очень быстрая запись
🔸 чтение значительно быстрей чем JSON, YAML итд
🔸 размер файла значительно меньше, так как нет разметки
🔸 можно записывать данные по мере поступления не загружая всё в память
🔸 можно извлечь любую часть данных независимо
Из минусов
🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата)
🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию.
🔹 не так-то просто создать такой файл без специальной библиотеки
В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии.
(Это не означает что нельзя записать данные разного типа, просто это будет не так удобно)
Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого
f15d cd29 a564 4578 ...
09e2 9bc4 a696 1253 ...
84e9 4de1 3b23 c24a ...
2534 5161 28e0 709d ...
...
Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла.
К чему это я? Читайте в следующем посте...
#tricks#basic
MyTonWallet v3.5 – let's take a look!
💎What has changed:
🫥The transaction feed has become more convenient and informative. "Change" and technical transactions are now grouped and do not interfere with viewing the history, and token icons are displayed during exchange. You can even see the average purchase price of a coin – very convenient
🩷
🫥Hiding the balance – the button is located at the top of the card on the main screen.
🫥 Now creating a deposit link, you can select any TON-token in which you want to receive funds to your wallet.
🫥MyTonWallet NFT cards provide access to advanced interface personalization. All palettes can be seen in the settings.
🔄 Since March 27, the service fee for $MY token exchanges in pairs with TON and USDT has been removed. The #MyTonWallet team hinted that they are working on further updates and exploring new blockchains. 👀
Channel | Chat | Mini-app
Updates from TON — LIVE: New Features in MyTonWallet
#TON#MyTonWallet
TON — LIVE reports that MyTonWallet has introduced an update allowing for mass transfers of TON and tokens in a single transaction, along with new options for renewing multiple TON DNS domains simultaneously.
Source: link
@tonlines
TON — LIVE: MyTonWallet v3.6 Update Released
#MyTonWallet#TON
TON — LIVE reports that MyTonWallet has released update v3.6, introducing the ability to view any TON and TRON addresses and share links to transfers immediately after sending. The update also includes action previews in dApp and auto-unlock via PIN.
Source: link
@tonlines
TON — LIVE: MyTonWallet to Launch Bank Cards
#MyTonWallet#TON
The TON — LIVE channel reports that MyTonWallet is planning to introduce bank cards. This development could enhance MyTonWallet's service offerings.
Source: link
@tonlines
TON — LIVE: NFT Card Minting Resumes
#MyTonWallet#NFT
TON — LIVE announces that MyTonWallet has resumed minting of NFT cards for users who staked or exchanged coins in the past month.
Source: link
@tonlines
TON — LIVE: MyTonWallet Unveils NFT Card Minting
#MyTonWallet#NFT
MyTonWallet has introduced NFT card minting, available for only 50 active users. These cards offer unique wallet design customization, with more features to be announced soon.
Source: link
@tonlines
🌿🌸 Spring is Here! Fresh Features from MyTonWallet v3.4
😎The most important news
In version v3.4, a mini-app #MyTonWalletappeared inside Telegram. Now you can use your favorite wallet in TMA format
🩷 — @myapp. Just import the Seed phrase from your current TON wallet and you can use it 🤑
Changes and new features:
🔵Knowledge base – a new section in the wallet settings (there is also a direct link to the guides ). For beginners, this is a very useful feature, as there is a lot of information about working with #web3 environment.
🔵 Several new features have been added for working with addresses and transactions.
🔵Transparent fees in TON Connect are a very convenient addition that allows you to see the size of $TON fees
💎Channel | Chat | Mini-app
TON — LIVE: Integration of USDe Stablecoin in MyTonWallet
#Ethena#MyTonWallet
TON — LIVE shares that the USDe stablecoin from Ethena is now integrated into MyTonWallet. Users can also participate in staking with returns up to 18% annually.
Source: link
@tonlines
⚡️Storm Trade: STORM Token Rewards Distributed
#STORM#MyTonWallet
Storm Trade has announced that rewards in STORM token from the MyTonWallet contest have been successfully distributed. Wallet holders are advised to check their balances.
Source: link
@tonlines
⚡️Storm Trade News: Join the $STORM Trading Tournament!
#STORM#MyTonWallet
Storm Trade | News has partnered with MyTonWallet for a trading tournament, offering $2,500 in prizes for top $STORM traders. Participants can earn cashback and stake $MY to reduce fees. The tournament runs from April 14–29.
Source: link
@tonlines
🎙New Interview with the Creator of MyTonWallet
TON App Journal recently published a written interview with Alexander Zinchuk, the founder of 💎MyTonWallet. If you're curious about the project’s philosophy and the team’s vision, it’s definitely worth a read
Highlights from the conversation:
🔵#MyTonWallet is built on the principles of freedom, user respect, and decentralization.
🔵Security, transparency, and ease of use are top priorities. Features like TON Proxy and multichain standards help make the TON ecosystem more accessible.
🔵 The team is made up of experienced developers focused on minimalist design and intuitive UX.
🔵#MTW was the first wallet on TON to undergo a CertiK audit.
🗣We’re currently working closely with TON Core, DeDust, and Tonscan to improve the speed of transfers and swaps within the network — and that’s just the beginning🗣 , says Alexander.
📖The MyTonWallet blog has been live for nearly six months, sharing major updates and release news (also mirrored in their Telegram channels).
💡 The team also published an important breakdown of a seed phrase theft scheme — a must-read for newcomers.