Один из самых удобных способов записать данные это использование готовых форматов, такие как 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
Warpinator for Android is an unofficial port of Linux Mint's file sharing tool of the same name. It is fully compatible with the original protocol and allows for easy transfer of files between Android and Linux devices.
Features:
- Automatic discovery of compatible services on local network
- Works on WiFi or hotspot, no internet connection needed
- Transfer any type of files quickly and easily
- Receive entire directories
- Run multiple transfers in parallel
- Share files from other applications
- Limit who can connect using a group code
- Option to start on boot
- Does not require your location or any other unnecessary permissions
Android
https://github.com/slowscript/warpinator-android
https://f-droid.org/packages/slowscript.warpinator/
Linux
https://github.com/linuxmint/warpinator
Windows
https://winpinator.swisz.cz
https://github.com/slowscript/warpinator-windows
#share#transfer
LocalSend
free, open-source multiplatform app that allows you to securely share files and messages with nearby devices over your local network without needing an internet connection.
https://github.com/localsend/localsend
#share#transfer
FlyingCarpet
Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips in close range.
https://github.com/spieglt/FlyingCarpet
#transfer#share
Sharik
Share files across devices with Sharik!
The app works with a Wi-Fi connection or a Wi-Fi Hotspot. No internet connection is needed. It is available for Android, iOS, Windows, Mac, and Linux.
Download - https://github.com/marchellodev/sharik/releases
Source - https://github.com/marchellodev/sharik/
@foss_Android
#share#transfer
Now KDE Connect can hook up your Windows machine as well!
KDE Community @ https://www.twitter.com/kdecommunity/status/1409808049116700673/
The Windows version of KDE Connect gets official support and you can get the beta version right now from the Microsoft Store. Exclusive link-only access: https://microsoft.com/store/apps/9N93MRMSXBF0
https://kdeconnect.kde.org
https://f-droid.org/repo/org.kde.kdeconnect_tp
#kdeconnect#transfer#windows
tFileTransporter
Transfer apps, images and files to Android Devices and PCs
Use UDP Broadcast or WiFi P2P create connections, Use TCP protocol to transfer files. This program builds with RxJava and Kotlin Coroutines.
Android:
https://github.com/Tans5/tFileTransporter
F-droid (Izzy repo): https://f-droid.org/packages/com.tans.tfiletransporter/
Play Store: https://play.google.com/store/apps/details?id=com.tans.tfiletransporter
Desktop:
https://github.com/Tans5/tFileTransfer_desktop
#tFileTransporter#transfer#share
Warpdrop
Warpdrop is a privacy-first, peer-to-peer file sharing tool that allows users to securely transfer files directly between terminals and browsers with ephemeral links, powerful NAT traversal, and complete self-hosting control.
🔗 Links:
- Website
- Features
- Screenshots
- Support group
- Source code
Developer: Mohd Zaid
❤️ Support the Project
If this project makes your life easier, here are a few quick ways to show some love:
⭐ Star the repo/app
☕ Buy a coffee for the developer
🛠 Contribute code, issues, or pull-requests
🏷 Tags: #Website#P2P#Tools#Transfer
#Musicopy#Music#File#Transfer
Join the Musicopy: Music File Transfer beta on ✈️#TestFlight
🔗 Link: https://testflight.apple.com/join/Ck9KaZVR
Shared by Dimitri
.
KDE Connect is an app that makes it easy to connect your DeGoogled phone and/or Linux Phone to your Linux laptop using your phone's hot spot, or any network.
KDE Connect can do these things:
- Share files
- Share clipboard
- Control Slideshows w/phone
- Send/Receive texts on laptop
(Using KDE Connect
Taskbar Indicator)
- Control laptop media player
- Move laptop mouse pointer
1. Install KDE Connect on phone
Use KDEConnect on F-Droid
2. Install on laptop
For Debian based distros:
sudo apt install kdeconnect
On your laptop firewall, make sure you open ports that KDE Connect uses.
To do this, open up terminal and enter these commands:
sudo ufw allow 1714:1764/udp
sudo ufw allow 1714:1764/tcp
sudo ufw reload
3. Connect both devices
- Connect both to the same network
- Open app on both devices
- Find and pair devices
⚡️@LinuxTechIndex
#KDEConnect#transfer#Files#share
Croc
Easily and securely send things from one computer to another
Features
- allows any two computers to transfer data (using a relay)
- provides end-to-end encryption (using PAKE)
- enables easy cross-platform transfers (Windows, Linux, Mac, Android)
- allows multiple file transfers
- local server or port-forwarding not needed
- ipv6-first with ipv4 fallback
https://github.com/schollz/croc
https://f-droid.org/en/packages/com.github.howeyc.crocgui/
📡@NoGoolag📡@Libreware
#croc#transfer#send#share