Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
kMeet
Free and secure videoconferencing solution
kMeet is a videoconferencing solution that respects your privacy for all your discussions.No e-mail address, no advertising and no registration are required. Your discussions are not analysed and are only transmitted through Infomaniak servers in Switzerland.
Features :
- Create online (audio and video) meetings with multiple people
- Excellent audio quality
- Unlimited number of participants (subject to resources)
- No apps required for desktop computers
- Join meetings hosted by Infomaniak Meet or Jitsi
- Protect access to your meetings with a password
- Discuss and share resources via the integrated chat function
- Invite your participants via a URL
Download - https://play.google.com/store/apps/details?id=com.infomaniak.meet
https://github.com/Infomaniak/android-infomaniak-meet
#im#Videocall
@foss_Android
Jitsi's official instance now requires you to authenticate with Facebook, Google, or Microsoft to host a call
https://jitsi.org/blog/authentication-on-meet-jit-si/
Jitsi was a quick-and-easy (not to mention private and anonymous) video chat tool for friends and also strangers. Jitsi's killer feature was being a FOSS 1-click, no sign-up call service.
Now you'll have to deploy your own instance if you want to avoid authenticating with Facebook, Google, or Microsoft (Github). But by deploying your own instance, you are effectively no longer anonymous, as you'll need to provide billing info to your host, or provide your home IP so folks can connect to it.
https://jitsi.github.io/handbook/docs/community/community-instances/
This list is dynamically refreshed and provides a fair amount of alternative servers:
https://ladatano.partidopirata.com.ar/jitsimeter/
#jitsi#videocall
#TBOT Show 7: The Significance of Dorsey’s Bitchat, Worlds First eSIM Hack, Mexico’s Digital ID, New Show Source Insights
Took a week off and now I’m back. 😎 (with a new addition to the show?!) (also - big sorry for the show being 40 minutes)
WATCH THE SHOW ON SUBSTACK
https://odysee.com/@takebackourtech:f/tbot-show-7:6
Here’s the stories for the week:
Jack #Dorsey’s #Bitchat - The Real Story: The tech mogul Jack Dorsey released a censorship proof messaging app in late June - named Bitchat. It runs a #bluetooth#mesh network, end to end #e2e#encryption, and rolling IDs and is picking up traction. I share my thoughts on the app, and concerns I have - but that’s not even the real story. I think Jack has a bigger message than just the app.
World’s First #eSIM Hack: A security lab out of Poland just demonstrated a hack on one of the largest SIM providers for IoT devices. We’ll get techy in our understanding and ask the question, could this impact our phones?
#DigitalID, Coming Soon To #Mexico: The Mexican government has signed a new #Biometric#ID law, known as the CURP. How is this enforced and what does it mean for Mexican residents? Find out today.
Decentralized #Video Conferencing: Recently I’ve been relying more on video conferences instead of calling people, especially while traveling. Good thing I’ve got the #Jitsi app, I’ll show you my setup!
#videocall
New Show, “Source Insights”: You follow #TBOT to stay informed on tech freedom. Now go deeper with a new weekly show “Source Insights”, where Hakeem shares his tools, lifestyle and productivity tips, entrepreneurial advice, wisdom from guides, and personal experiences.
Go deeper, join me as a Source Seeker. Unlock access with a paid subscription.
UNLOCK ACCESS
🪄 We aim for our show to be well-researched, well-informed and focused on the most impactful stories
⭐️ PLUS - Each story comes with recommendations and there’s one cool tech trick or open-source solution every week.
We’ll be publishing full posts and clips of each of these stories soon.
Share this post with your crew. 🚢
👩💻Get private phones, laptops, and tablets
📲SIM Swap Survival Guide Webinar