Stream data through multiple QRCodes
a bit like this meme:
This project is made possible by all the sponsors supporting my work
You can join them at my sponsors profile:
- QiFi CLI - CLI for streaming QR code file transmission
- luby-transform - Luby Transform encoding and decoding
- @qifi/generate - Stream Generated QR Codes for data transmission
This situation of streaming QR code data transmission is similar to the "Binary Erasure Channel (BEC)," which is a communication model. In this model, the sender transmits binary data (0 or 1), and the receiver has a certain probability of not receiving some data bits, which are marked as "erased" or "lost." In other words, the receiver knows which bits are lost but does not know their specific values. This model is used to study and design coding techniques that can effectively transmit information even in cases of data loss.
Scientists have already achieved very mature research results on how to efficiently transmit data in BEC, one of which is using "Fountain Codes." Fountain Codes are a type of error-correcting code that can effectively transmit information even in the case of data loss. This project uses Luby Transform coding, which is a type of Fountain Code. The basic principle is to divide the original data into multiple small blocks and then generate an unlimited number of encoded blocks through encoding. The receiver only needs to receive enough encoded blocks (usually slightly more than the original blocks) to reconstruct the original data.
There are two main ways to install and use it in offline mode, on both, computer and phone devices
Running on computer
First, and easiest one
- Download index.html as Raw file from repository
- Open it in your browser and run in offline mode (For Firefox press Alt -> Select "File" and then "Work in autonomous mode")
- NOTE: If you want to Send file, before choosing it, firstly push "Receive" and then once again on "Send", and you are ready to go
Second, but harder way using Node.js and pnpm
- Install Node.js
- Do next commands
sudo npm install -g pnpm
git clone https://github.com/qifi-dev/qrs.git
cd qrs
pnpm install
pnpm build
node .output/server/index.mjs
- Visit 127.0.0.1:3000 in your browser to use it
Running on phone
First, and easiest one (tested on Brave for Android)
- Visit https://qrss.netlify.app/
- Go to Menu and choose "Add to Main Screen"
- Install it and use without internet
Second, running small local server
- Download index.html file from repository
- Install and run ServeIt from F-Droid
- Choose directory with index.html and push "Start Server"
- Open 127.0.0.1:8888 in your browser
- Go to settings, choose "Version for Desktop"
- NOTE: If you want to Send file, before choosing it, firstly Push "Receive" and then once again on "Send", and you are ready to go