Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
Hey, you can check your $ZRO Token Airdrop eligibility on TokenPocket!
📱Open TokenPocket > Switch to the Discover page > You can see the DApp on the Airdrop Zone!
💻You can get the checking page on TokenPocket's DApp Store!
👉https://tokenpocket.pro/en/dappstore
Good luck! 💙#LayerZero
Layer Zero AirDrop Starts NOW!
All active participants will receive a guaranteed drop of $ZRO tokens.
Airdrop : https://linktr.ee/labslayerzero
A total of 12.000.000 $ZRO coins have been allocated, time is limited!
#layerzero#airdrop#tokens#coin
📋The sensational #LayerZero (ZRO) is trading at $ 3.05 and the current circulation of unlocked coins is only $ 770 million, the total capitalization is also small - $ 3 billion, which is 2-3 times less than Aptos or SUI. #zkSync (ZK) has a similar picture, the total capitalization is even more than ZRO by 900 million.
🧐It looks very modest, I think few people predicted this. Looking at this picture, you start to worry about the rest of the altos with large capitalization. And looking at the small ones, you also think about it. After this, is it possible to believe in a further correction of Chia (XCH)?
🥸Both projects are technologically advanced, but in different aspects. zkSync focuses on scaling and efficiency within a single blockchain (Ethereum) using advanced cryptographic techniques. LayerZero is aimed at improving the interaction between different blockchains, which is also an important task for the entire industry.
😎I think for #ZRO and #ZK you need to allocate a place in your portfolio, lay a theoretical descent lower by 30-50% and start buying a ladder from the current level, of course we are talking about spot. That is, to allow a speculative decrease in ZRO to $ 2.1 and ZK to $ 0.13 due to a speculative decrease and liquidation of longs on futures. But you need to understand that the current price is already very attractive, you need to partially buy now.
0⃣#ZRO + #Tether = 🚀🚀🚀
Tether recently invested in #LayerZero, and you know they don't drop cash without deep due diligence. 🕵️♂️ The fundamentals are rock solid.
This rally is just the beginning. 🌤 I’m stacking as much $ZRO as possible. targeting 2x - 5x gains! 💸
Get in or get left behind.👋
#DeFi#BullRun $ZRO #ZROUSDT
https://x.com/CryptoBull_360/status/2021403228970315928?s=20
Bitcoin: Panic Buying Amid Market Shakeup
Panic reactions in the market are evident as Bitcoin fluctuates. Key developments in the TON ecosystem include:
- TVM Ventures launching a $100M fund for TON growth 🔗
- Updates from TON Core for Dec 2024 - Jan 2025 🔗
- Steve Yun discusses DeFi’s future in Telegram on CNBC 🔗
- First mid-core web3 game launched on TON 🔗
- Support program for Mini Apps initiated 🔗
- Innovations from Notcoin team highlighted 🔗
- LayerZero’s new USDT bridge enhances TON’s cross-chain capabilities 🔗
- Key investments in DeFi and SocialFi detailed by TVM Ventures 🔗
- TON’s ecosystem expands beyond major project monopolies 🔗
- TRM Labs introduces a comprehensive blockchain analysis tool for TON 🔗
- The domain believers.ton is permanently lost 🔗
#Bitcoin#DeFi#TON#Crypto#Web3#Investment#LayerZero#Blockchain#MiniApps#PanicBuying#TVMVentures#Notcoin#TRMLabs
Multiple Fundraising Rounds Announced
Several companies secured funding recently:
- OpenCopilot raised $1.52M for AI customer support.
- Archive Intel secured $1.50M for AI-driven data archiving solutions.
- Serene obtained $1.14M using AI for customer insights and compliance.
- Sytrex raised $1.10M to aid financial institutions.
- Tire Swing acquired $500K focusing on cybersecurity.
In other news, the SEC sues Elon Musk over misleading shareholders during the Twitter acquisition, and Meta plans to lay off 3,600 employees for inefficiency. More updates on AI job creation and Bitcoin market analysis suggest significant changes ahead.
#Funding#AI#Crypto#SEC#ElonMusk#Meta#Bitcoin#CustomerSupport#DataArchiving#FinancialInstitutions#AIJobs#LayerZero#Serene#Sytrex#TireSwing#ArchiveIntel#OpenCopilot