Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
🔥NEW RELEASE🔥
😁Systematically Attacking The Guard 3.0: Inside Camping By Gordon Ryan😁
➡️In Inside Camping 3.0, Gordon breaks down one of the most dominant passing strategies in modern jiu jitsu—inside camping—a pressure-based approach designed to wear down, frustrate, and ultimately break even the most seasoned guard players.
➡️“Camping” refers to the act of "setting up camp" in a dominant, safe position during guard passing—forcing the bottom player to carry your weight, expend energy, and expose weaknesses.
$349😍$24.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GordonRyan#Passing#NoGi#NewWave
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Pressure Drop: Close Range Passing by Brian Glick😁
➡️Pressure Drop: Close Range Passing is the latest instructional from Brian Glick—one of the most respected teachers in modern jiu-jitsu and a long-time black belt under John Danaher.
➡️Known for his meticulous, methodical, and deceptively simple approach to the art, Brian breaks down the close-range passing game into clear, repeatable steps that any grappler can immediately apply.
$197😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#BrianGlick#Passing#NoGi#NewWave
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Dynamic Guard Passing: Inside Position by Brian Glick😁
➡️Unlock the secrets of high-level standing guard passing with one of the most respected minds in Brazilian Jiu-Jitsu, Brian Glick, black belt under the legendary John Danaher.
➡️This instructional zeroes in on how to pass while standing, using the inside position to dominate exchanges, neutralize leg entanglements, avoid leg locks, and shut down wrestle-up attacks
$197😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#BrianGlick#Passing#NoGi#NewWave
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Pressure Drop Dynamic Guard Passing: Outside Position by Brian Glick😁
➡️Unlock the secrets of high-level guard passing with Pressure Drop Dynamic Guard Passing: Outside Position by Brian Glick, a black belt under the legendary John Danaher.
➡️Renowned for his ability to distill complex techniques into clear, accessible instruction, Brian brings his signature clarity and precision to this must-have series.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#BrianGlick#NewWave#NoGi#Passing
💁♀️Buy
💁♀️
🐈⬛NEW RELEASE
🐈⬛
🐈⬛Master the Move: Toreando Guard Pass by John Danaher
🐈⬛
🐈⬛Master one of the most dominant and reliable guard passing systems in Brazilian Jiu-Jitsu with Master the Move: Toreando Guard Pass by John Danaher.
🐈⬛In this comprehensive instructional, he turns his attention to the toreando (bullfighter) pass—arguably the highest percentage and most versatile guard pass in the sport.
$197
🐈⬛$19.99
🐈⬛
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#JohnDanaher#Passing#NoGi#NewWave
🐈⬛Buy
🐈⬛
🔥NEW RELEASE🔥
😁Master The Move: The Knee Cut Guard Pass By John Danaher😁
➡️The knee cut pass is one of the most dominant and highest-percentage guard passes in Brazilian Jiu-Jitsu—and no one understands it more deeply than John Danaher.
➡️From controlling the far-side shoulder and dominating the near-side hip, to precise knee placement, underhook mechanics, and passing posture, nothing is left unexplained
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#JohnDanaher#Passing#NoGi#NewWave
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Systematically Attacking the Scrimmage: Securing The Score by Gordon Ryan😁
➡️Systematically Attacking the Scrimmage: Securing The Score is Gordon Ryan’s revolutionary 9-part instructional focused on the most decisive phase of competitive BJJ: the battle to secure points and stabilize position.
➡️Anyone can force movement. But can you win the transition? Can you solidify the position? Can you secure the score before your opponent escapes?
$349😍$24.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#GordonRyan#Takedowns#NoGi#NewWave
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Systematically Attacking The Scrimmage: Lower Body Takedowns By Gordon Ryan😁
➡️Gordon Ryan—widely recognized as the greatest no-gi grappler of all time—unleashes his deep technical mastery in Systematically Attacking the Scrimmage: Lower Body Takedowns.
➡️In this groundbreaking instructional, Gordon meticulously breaks down ankle pick variations, single legs, knee taps, and far more.
➡️Designed for practitioners of all levels, this series provides a complete system—not just isolated techniques—making it the most comprehensive lower body takedown resource ever released in the sport of submission grappling.
$349😍$24.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GordonRyan#Takedowns#NewWave#NoGi
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁My Evolution Your Revolution ADCC 2024 By Gordon Ryan😁
➡️Take a front-row seat into the mind of the most dominant no-gi grappler in history. In My Evolution, Your Revolution: ADCC 2024, Gordon Ryan peels back the curtain on his historic 2024 ADCC performance — and gives you the exact blueprint that made him the most successful ADCC competitor of all time.
➡️This is more than just match footage. This is the most in-depth instructional Gordon has ever released, combining technical mastery, strategic commentary, and championship mindset.
$197😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GordonRyan#NewWave#NoGi#ADCC
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Forging The Guard: Mastering Foundation's Of The Clamp By Giancarlo Bodoni😁
➡️Unlock the secret to dominating your opponent with Giancarlo Bodoni’s "Forging the Guard: Mastering Foundations of the Clamp". As a 2x ADCC champion, training partner of Gordon Ryan, and student of John Danaher, Giancarlo brings you an exclusive BJJ instructional that dives deep into the world of the Clamp Guard
➡️In this series, Giancarlo breaks down the foundational elements of the Clamp Guard, a unique guard that allows for seamless sweeps, submissions, and positional control.
➡️Whether you're a beginner or an experienced practitioner, this instructional will elevate your guard game by showing you how to lock your opponent down, maintain dominant control, and transition fluidly into devastating attacks.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#BJJFanatics#NewWave#NoGi
💁♀️Buy
💁♀️
🐈⬛NEW RELEASE
🐈⬛
🐈⬛Under Control Transforming Your Closed Guard by Brian Glick
🐈⬛
🐈⬛In Under Control: Transforming Your Closed Guard, Brian Glick delivers a complete system for building a closed guard that is tight, efficient, and relentlessly effective—regardless of size or strength
🐈⬛This is not a collection of random moves—it’s a carefully structured approach to controlling, breaking, and submitting opponents from one of jiu-jitsu’s most important positions.
$197
🐈⬛$14.99
🐈⬛
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#BrianGlick#Transitions#NoGi#NewWave
🐈⬛Buy
🐈⬛
🔥NEW RELEASE🔥
😁Master The Move: The Shoulder Crunch Series By John Danaher😁
➡️Learn The Shoulder Crunch System That John Danaher’s Elite Students Use To Break Through Modern No-Gi Guards & Control Opponents Like Never Before
➡️This position has become a staple in the arsenal of Danaher’s most successful students, including Gordon Ryan and Giancarlo Bodoni, for its ability to shut down modern pressure passing, neutralize resistance, and launch devastating attacks.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#JohnDanaher#NewWave#NoGi#Guard
💁♀️Buy
💁♀️