fastqr 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/BUILD.md +10 -74
- data/CHANGELOG.md +1 -1
- data/CMakeLists.txt +1 -1
- data/DISTRIBUTION.md +14 -14
- data/INSTALL.md +4 -4
- data/LICENSE +1 -3
- data/PREBUILT.md +3 -3
- data/README.md +285 -149
- data/VERSION +1 -1
- data/bindings/nodejs/README.md +448 -0
- data/bindings/nodejs/package.json +1 -2
- data/bindings/php/src/FastQR.php +89 -127
- data/bindings/ruby/extconf.rb +4 -4
- data/bindings/ruby/lib/fastqr/version.rb +1 -1
- data/bindings/ruby/prebuilt/linux-aarch64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/linux-aarch64.tar.gz +0 -0
- data/bindings/ruby/prebuilt/linux-x86_64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/linux-x86_64.tar.gz +0 -0
- data/bindings/ruby/prebuilt/macos-arm64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/macos-arm64.tar.gz +0 -0
- data/bindings/ruby/prebuilt/macos-x86_64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/macos-x86_64.tar.gz +0 -0
- data/build.sh +5 -5
- data/composer.json +1 -2
- data/docs/NODEJS_USAGE.md +2 -2
- data/docs/README.md +5 -4
- data/prebuilt/README.md +5 -6
- data/src/fastqr.cpp +2 -44
- metadata +5 -4
data/README.md
CHANGED
|
@@ -2,88 +2,168 @@
|
|
|
2
2
|
|
|
3
3
|
[](LICENSE)
|
|
4
4
|
[](https://isocpp.org/)
|
|
5
|
+
[](https://en.wikipedia.org/wiki/C11_(C_standard_revision))
|
|
6
|
+
[](https://cmake.org/)
|
|
7
|
+
[](https://www.gnu.org/software/bash/)
|
|
8
|
+
[](https://www.ecma-international.org/ecma-262/)
|
|
5
9
|
[](https://rubygems.org/gems/fastqr)
|
|
6
10
|
[](https://www.npmjs.com/package/fastqr)
|
|
7
11
|
[](https://packagist.org/packages/fastqr/fastqr)
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
**The fastest QR code generator on the planet.** 🚀
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors. Logo embedding. Precise size control.
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
- ⚡ **Batch Mode**: Generate 1000 QR codes in ~0.4s (7x faster than single mode!)
|
|
15
|
-
- 🌐 **Full UTF-8 Support**: Vietnamese, Japanese (Kanji, Hiragana, Katakana), Chinese, emoji, etc.
|
|
16
|
-
- 🎨 **Custom Colors**: Choose colors for QR code and background
|
|
17
|
-
- 📐 **Exact Size**: Generate QR codes with precise pixel dimensions (e.g., 2000x2000px)
|
|
18
|
-
- 🖼️ **Logo Embedding**: Add company logos to the center of QR codes
|
|
19
|
-
- 📦 **Multiple Languages**: Bindings for Ruby, Node.js, PHP
|
|
20
|
-
- 🛡️ **Error Correction**: Supports 4 levels (L, M, Q, H)
|
|
21
|
-
- 💾 **Multiple Formats**: PNG, JPG, WebP
|
|
22
|
-
- ✅ **Pre-built Binaries**: No dependencies needed for gem/npm/composer packages!
|
|
17
|
+
---
|
|
23
18
|
|
|
24
|
-
##
|
|
19
|
+
## 🔥 Performance Benchmarks
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
|---------|--------|----------|
|
|
28
|
-
| **Speed** | ✅ The same | ✅ The same |
|
|
29
|
-
| **Exact Size** | ✅ 2000x2000px exact | ❌ Scale-based (hard to be exact) |
|
|
30
|
-
| **UTF-8 Support** | ✅ Full | ⚠️ Limited |
|
|
31
|
-
| **Colors** | ✅ RGB customizable | ❌ Black only |
|
|
32
|
-
| **Logo** | ✅ Yes | ❌ No |
|
|
33
|
-
| **Bindings** | ✅ Ruby, Node.js, PHP | ❌ CLI only |
|
|
34
|
-
| **Installation** | ✅ Pre-built binaries | ❌ Requires system deps |
|
|
21
|
+
### ⌨️ CLI Performance: FastQR vs qrencode
|
|
35
22
|
|
|
36
|
-
|
|
23
|
+
*Task: Generate 1,000 QR codes (500×500px)*
|
|
24
|
+
|
|
25
|
+
| Library | Sequential Mode | Batch Mode | Speedup |
|
|
26
|
+
|---------|----------------|------------|---------|
|
|
27
|
+
| **FastQR** | 2.56s 🚀 | **0.37s** ⚡ | **8x faster** with batch |
|
|
28
|
+
| qrencode | 2.97s 🐌 | ❌ Not supported | - |
|
|
29
|
+
|
|
30
|
+
**FastQR is 16% faster in sequential mode and 8x faster with batch mode!**
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### 💎 Ruby Performance: FastQR vs rqrcode
|
|
35
|
+
|
|
36
|
+
*Task: Generate 1,000 QR codes (500×500px)*
|
|
37
|
+
|
|
38
|
+
| Library | Sequential Mode | Batch Mode | Speedup |
|
|
39
|
+
|---------|----------------|------------|---------|
|
|
40
|
+
| **FastQR** | 3.49s 🚀 | **0.38s** ⚡ | **17x faster** with batch |
|
|
41
|
+
| rqrcode | 59.45s 🐢 | ❌ Not supported | - |
|
|
42
|
+
|
|
43
|
+
**FastQR is 17x faster in sequential mode and 157x faster with batch mode!**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 🟢 Node.js Performance: FastQR vs qrcode
|
|
48
|
+
|
|
49
|
+
*Task: Generate 1,000 QR codes (500×500px)*
|
|
50
|
+
|
|
51
|
+
| Library | Sequential Mode | Batch Mode | Speedup |
|
|
52
|
+
|---------|----------------|------------|---------|
|
|
53
|
+
| **FastQR** | 2.43s 🚀 | **0.46s** ⚡ | **7x faster** with batch |
|
|
54
|
+
| qrcode | 17.25s 🐌 | ❌ Not supported | - |
|
|
55
|
+
|
|
56
|
+
**FastQR is 7x faster in sequential mode and 37x faster with batch mode!**
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 🐘 PHP Performance: FastQR vs endroid/qr-code
|
|
61
|
+
|
|
62
|
+
*Task: Generate 1,000 QR codes (500×500px)*
|
|
63
|
+
|
|
64
|
+
| Library | Sequential Mode | Batch Mode | Speedup |
|
|
65
|
+
|---------|----------------|------------|---------|
|
|
66
|
+
| **FastQR** | 1.75s 🚀 | **0.64s** ⚡ | **8.4x faster** with batch |
|
|
67
|
+
| endroid/qr-code | 14.72s 🐌 | ❌ Not supported | - |
|
|
68
|
+
|
|
69
|
+
**FastQR is 8.4x faster in sequential mode and 23x faster with batch mode!**
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 💪 Why FastQR Dominates
|
|
74
|
+
|
|
75
|
+
### Speed Comparison Summary
|
|
76
|
+
|
|
77
|
+
| Platform | Library | Sequential | Batch | FastQR Advantage |
|
|
78
|
+
|----------|---------|------------|-------|------------------|
|
|
79
|
+
| **⌨️ CLI** | qrencode | 2.97s | ❌ | **8x faster** ⚡ |
|
|
80
|
+
| **💎 Ruby** | rqrcode | 59.45s | ❌ | **157x faster** 🚀 |
|
|
81
|
+
| **🟢 Node.js** | qrcode | 17.25s | ❌ | **37x faster** ⚡ |
|
|
82
|
+
| **🐘 PHP** | endroid/qr-code | 14.72s | ❌ | **23x faster** 🚀 |
|
|
83
|
+
|
|
84
|
+
**Average: FastQR with batch mode is 56x faster than popular alternatives!**
|
|
85
|
+
|
|
86
|
+
---
|
|
37
87
|
|
|
38
|
-
|
|
88
|
+
## ✨ What Makes FastQR Special?
|
|
39
89
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
90
|
+
### Features That Set Us Apart
|
|
91
|
+
|
|
92
|
+
| Feature | FastQR | Others |
|
|
93
|
+
|---------|--------|--------|
|
|
94
|
+
| **Batch Processing** | ✅ Up to 157x faster | ❌ Not available |
|
|
95
|
+
| **Exact Size Control** | ✅ 2000×2000px exact | ❌ Scale-based (imprecise) |
|
|
96
|
+
| **Full UTF-8 Support** | ✅ Vietnamese, Japanese, Chinese, emoji | ⚠️ Limited or none |
|
|
97
|
+
| **Custom Colors** | ✅ RGB foreground + background | ⚠️ Limited or none |
|
|
98
|
+
| **Logo Embedding** | ✅ Built-in logo support | ⚠️ Limited or none |
|
|
99
|
+
| **Language Bindings** | ✅ Ruby, Node.js, PHP, C++ | ✅ Usually supported |
|
|
100
|
+
| **Error Correction** | ✅ 4 levels (L, M, Q, H) | ✅ Usually supported |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 🚀 Key Features
|
|
105
|
+
|
|
106
|
+
- ⚡ **Blazing Fast**: Up to **157x faster** than popular alternatives with batch mode
|
|
107
|
+
- 🔥 **Batch Processing**: Generate 1,000 QR codes in **~0.37 seconds**
|
|
108
|
+
- 🌐 **Full UTF-8 Support**: Vietnamese, Japanese (Kanji, Hiragana, Katakana), Chinese, emoji, and more
|
|
109
|
+
- 🎨 **Custom Colors**: Choose any RGB color for QR code and background
|
|
110
|
+
- 📐 **Exact Size Control**: Generate QR codes with precise pixel dimensions (e.g., 2000×2000px)
|
|
111
|
+
- 🖼️ **Logo Embedding**: Add company logos to the center of QR codes
|
|
112
|
+
- 🛡️ **Error Correction**: Supports 4 levels (L, M, Q, H)
|
|
113
|
+
- 💾 **Multiple Formats**: PNG, JPG, WebP
|
|
114
|
+
- 🔧 **Multiple Languages**: Native bindings for Ruby, Node.js, PHP, and C++
|
|
115
|
+
|
|
116
|
+
---
|
|
43
117
|
|
|
44
118
|
## 📦 Installation
|
|
45
119
|
|
|
46
|
-
###
|
|
120
|
+
### CLI Installation
|
|
47
121
|
|
|
122
|
+
**macOS (Homebrew):**
|
|
48
123
|
```bash
|
|
49
124
|
brew tap tranhuucanh/fastqr
|
|
50
125
|
brew install fastqr
|
|
51
126
|
```
|
|
52
127
|
|
|
53
|
-
|
|
128
|
+
**Linux (x86_64):**
|
|
129
|
+
```bash
|
|
130
|
+
# Download latest release (replace VERSION with latest version, e.g., 1.0.21)
|
|
131
|
+
VERSION="1.0.21"
|
|
132
|
+
wget https://github.com/tranhuucanh/fastqr/releases/download/v${VERSION}/fastqr-${VERSION}-linux-x86_64.tar.gz
|
|
133
|
+
tar -xzf fastqr-${VERSION}-linux-x86_64.tar.gz
|
|
134
|
+
sudo cp linux-x86_64/bin/fastqr /usr/local/bin/
|
|
135
|
+
sudo chmod +x /usr/local/bin/fastqr
|
|
136
|
+
|
|
137
|
+
# Verify installation
|
|
138
|
+
fastqr --version
|
|
139
|
+
```
|
|
54
140
|
|
|
141
|
+
**Linux (ARM64/aarch64):**
|
|
55
142
|
```bash
|
|
56
|
-
|
|
57
|
-
wget https://github.com/tranhuucanh/fastqr/releases/download/
|
|
58
|
-
|
|
143
|
+
VERSION="1.0.21"
|
|
144
|
+
wget https://github.com/tranhuucanh/fastqr/releases/download/v${VERSION}/fastqr-${VERSION}-linux-aarch64.tar.gz
|
|
145
|
+
tar -xzf fastqr-${VERSION}-linux-aarch64.tar.gz
|
|
146
|
+
sudo cp linux-aarch64/bin/fastqr /usr/local/bin/
|
|
147
|
+
sudo chmod +x /usr/local/bin/fastqr
|
|
59
148
|
```
|
|
60
149
|
|
|
61
|
-
### Language Packages
|
|
150
|
+
### Language Packages
|
|
62
151
|
|
|
63
152
|
**Ruby:**
|
|
64
153
|
```bash
|
|
65
154
|
gem install fastqr
|
|
66
|
-
# No system dependencies needed! 🎉
|
|
67
155
|
```
|
|
68
156
|
|
|
69
157
|
**Node.js:**
|
|
70
158
|
```bash
|
|
71
|
-
npm install fastqr
|
|
72
|
-
# No system dependencies needed! 🎉
|
|
159
|
+
npm install fastqr-pro
|
|
73
160
|
```
|
|
74
161
|
|
|
75
162
|
**PHP:**
|
|
76
163
|
```bash
|
|
77
164
|
composer require fastqr/fastqr
|
|
78
|
-
# No system dependencies needed! 🎉
|
|
79
165
|
```
|
|
80
166
|
|
|
81
|
-
**Important**: Starting from v1.0.0, all language packages include pre-built binaries for:
|
|
82
|
-
- macOS (Intel & Apple Silicon)
|
|
83
|
-
- Linux (x86_64 & arm64)
|
|
84
|
-
|
|
85
|
-
You don't need to install `libqrencode` or `libpng` separately! The binaries are automatically bundled and loaded.
|
|
86
|
-
|
|
87
167
|
### Build from Source
|
|
88
168
|
|
|
89
169
|
```bash
|
|
@@ -103,64 +183,134 @@ make
|
|
|
103
183
|
sudo make install
|
|
104
184
|
```
|
|
105
185
|
|
|
106
|
-
See [INSTALL.md](INSTALL.md) for more
|
|
186
|
+
See [INSTALL.md](INSTALL.md) for more options.
|
|
187
|
+
|
|
188
|
+
---
|
|
107
189
|
|
|
108
|
-
##
|
|
190
|
+
## 🎯 Quick Start
|
|
109
191
|
|
|
110
192
|
### CLI
|
|
193
|
+
|
|
194
|
+
**Single QR Code:**
|
|
111
195
|
```bash
|
|
112
196
|
fastqr "Hello World" output.png
|
|
113
197
|
fastqr -s 500 -f 255,0,0 "Red QR" red.png
|
|
114
|
-
fastqr -
|
|
198
|
+
fastqr -l logo.png -L 25 "QR with Logo" branded.png
|
|
115
199
|
```
|
|
116
200
|
|
|
117
|
-
|
|
201
|
+
**Batch Mode (8x faster!):**
|
|
118
202
|
```bash
|
|
119
|
-
|
|
203
|
+
# Create batch.txt with one text per line
|
|
204
|
+
echo "https://example.com/user/1" > batch.txt
|
|
205
|
+
echo "https://example.com/user/2" >> batch.txt
|
|
206
|
+
# ... add 1000 URLs
|
|
207
|
+
|
|
208
|
+
# Generate 1,000 QR codes in 0.37 seconds ⚡
|
|
209
|
+
fastqr -F batch.txt output_dir/
|
|
120
210
|
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Ruby
|
|
215
|
+
|
|
121
216
|
```ruby
|
|
122
217
|
require 'fastqr'
|
|
123
|
-
|
|
124
|
-
|
|
218
|
+
|
|
219
|
+
# Single QR code
|
|
220
|
+
FastQR.generate("Hello World", "qr.png", size: 500)
|
|
221
|
+
|
|
222
|
+
# Batch mode - 157x faster than rqrcode! 🚀
|
|
223
|
+
urls = (1..1000).map { |i| "https://example.com/user/#{i}" }
|
|
224
|
+
FastQR.generate_batch(urls, "output/")
|
|
225
|
+
# ⚡ Done in 0.38 seconds! (vs 59.45s with rqrcode)
|
|
226
|
+
|
|
227
|
+
# Custom colors and logo
|
|
228
|
+
FastQR.generate("https://example.com", "branded.png",
|
|
229
|
+
size: 800,
|
|
230
|
+
foreground: [255, 0, 0], # Red QR code
|
|
231
|
+
background: [255, 255, 200], # Light yellow background
|
|
232
|
+
logo: "logo.png",
|
|
233
|
+
logoSize: 20,
|
|
234
|
+
errorLevel: "H" # High error correction for logos
|
|
235
|
+
)
|
|
125
236
|
```
|
|
126
237
|
|
|
238
|
+
---
|
|
239
|
+
|
|
127
240
|
### Node.js
|
|
128
|
-
|
|
129
|
-
npm install fastqr # Pre-built binaries included!
|
|
130
|
-
```
|
|
241
|
+
|
|
131
242
|
```javascript
|
|
132
243
|
const fastqr = require('fastqr');
|
|
133
|
-
|
|
134
|
-
|
|
244
|
+
|
|
245
|
+
// Single QR code
|
|
246
|
+
fastqr.generate('Hello World', 'qr.png', { size: 500 });
|
|
247
|
+
|
|
248
|
+
// Batch mode - 37x faster than qrcode! 🚀
|
|
249
|
+
const urls = Array.from({length: 1000}, (_, i) =>
|
|
250
|
+
`https://example.com/user/${i+1}`
|
|
251
|
+
);
|
|
252
|
+
fastqr.generateBatch(urls, 'output/');
|
|
253
|
+
// ⚡ Done in 0.46 seconds! (vs 17.25s with qrcode)
|
|
254
|
+
|
|
255
|
+
// Custom colors and logo
|
|
256
|
+
fastqr.generate('https://example.com', 'branded.png', {
|
|
257
|
+
size: 800,
|
|
258
|
+
foreground: [255, 0, 0], // Red QR code
|
|
259
|
+
background: [255, 255, 200], // Light yellow background
|
|
260
|
+
logo: 'logo.png',
|
|
261
|
+
logoSize: 20,
|
|
262
|
+
errorLevel: 'H' // High error correction for logos
|
|
263
|
+
});
|
|
135
264
|
```
|
|
136
265
|
|
|
266
|
+
---
|
|
267
|
+
|
|
137
268
|
### PHP
|
|
138
|
-
|
|
139
|
-
composer require fastqr/fastqr # Pre-built binaries included!
|
|
140
|
-
```
|
|
269
|
+
|
|
141
270
|
```php
|
|
142
271
|
use FastQR\FastQR;
|
|
143
|
-
|
|
144
|
-
|
|
272
|
+
|
|
273
|
+
// Single QR code
|
|
274
|
+
FastQR::generate('Hello World', 'qr.png', ['size' => 500]);
|
|
275
|
+
|
|
276
|
+
// Batch mode - Lightning fast! ⚡
|
|
277
|
+
$urls = array_map(fn($i) => "https://example.com/user/$i", range(1, 1000));
|
|
278
|
+
FastQR::generateBatch($urls, 'output/');
|
|
279
|
+
// Done in ~0.4 seconds!
|
|
280
|
+
|
|
281
|
+
// Custom colors and logo
|
|
282
|
+
FastQR::generate('https://example.com', 'branded.png', [
|
|
283
|
+
'size' => 800,
|
|
284
|
+
'foreground' => [255, 0, 0], // Red QR code
|
|
285
|
+
'background' => [255, 255, 200], // Light yellow background
|
|
286
|
+
'logo' => 'logo.png',
|
|
287
|
+
'logoSize' => 20,
|
|
288
|
+
'errorLevel' => 'H' // High error correction for logos
|
|
289
|
+
]);
|
|
145
290
|
```
|
|
146
291
|
|
|
292
|
+
---
|
|
293
|
+
|
|
147
294
|
### C++
|
|
295
|
+
|
|
148
296
|
```cpp
|
|
149
297
|
#include <fastqr.h>
|
|
298
|
+
|
|
299
|
+
// Single QR code
|
|
150
300
|
fastqr::QROptions options;
|
|
151
301
|
options.size = 500;
|
|
152
|
-
fastqr::generate("Hello", "qr.png", options);
|
|
302
|
+
fastqr::generate("Hello World", "qr.png", options);
|
|
303
|
+
|
|
304
|
+
// Batch mode - Blazing fast! 🚀
|
|
305
|
+
std::vector<std::string> urls;
|
|
306
|
+
for (int i = 1; i <= 1000; i++) {
|
|
307
|
+
urls.push_back("https://example.com/user/" + std::to_string(i));
|
|
308
|
+
}
|
|
309
|
+
fastqr::generateBatch(urls, "output/", options);
|
|
310
|
+
// Done in ~0.4 seconds!
|
|
153
311
|
```
|
|
154
312
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Complete usage guides for each platform:
|
|
158
|
-
|
|
159
|
-
- **[CLI Usage Guide](docs/CLI_USAGE.md)** - Complete command-line reference with all options and examples
|
|
160
|
-
- **[Ruby/Rails Usage Guide](docs/RUBY_USAGE.md)** - Ruby and Rails integration with examples
|
|
161
|
-
- **[Node.js Usage Guide](docs/NODEJS_USAGE.md)** - Node.js, Express, and TypeScript guide
|
|
162
|
-
- **[PHP Usage Guide](docs/PHP_USAGE.md)** - PHP, Laravel, and WordPress integration
|
|
163
|
-
- **[Documentation Index](docs/README.md)** - Full documentation portal
|
|
313
|
+
---
|
|
164
314
|
|
|
165
315
|
## 📖 API Reference
|
|
166
316
|
|
|
@@ -169,10 +319,10 @@ Complete usage guides for each platform:
|
|
|
169
319
|
| Option | Type | Default | Description |
|
|
170
320
|
|--------|------|---------|-------------|
|
|
171
321
|
| `size` | int | 300 | Output size in pixels (QR codes are square) |
|
|
172
|
-
| `optimizeSize` | bool | false | Auto round-up to nearest integer multiple
|
|
173
|
-
| `foreground` | RGB array | [0,0,0] | QR code color |
|
|
174
|
-
| `background` | RGB array | [255,255,255] | Background color |
|
|
175
|
-
| `errorLevel` | string | 'M' | Error correction: L
|
|
322
|
+
| `optimizeSize` | bool | false | Auto round-up to nearest integer multiple |
|
|
323
|
+
| `foreground` | RGB array | [0,0,0] | QR code color (RGB) |
|
|
324
|
+
| `background` | RGB array | [255,255,255] | Background color (RGB) |
|
|
325
|
+
| `errorLevel` | string | 'M' | Error correction: L, M, Q, H |
|
|
176
326
|
| `logo` | string | "" | Path to logo image |
|
|
177
327
|
| `logoSize` | int | 20 | Logo size as percentage (1-50) |
|
|
178
328
|
| `quality` | int | 95 | Image quality for lossy formats (1-100) |
|
|
@@ -180,85 +330,63 @@ Complete usage guides for each platform:
|
|
|
180
330
|
|
|
181
331
|
### Error Correction Levels
|
|
182
332
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
333
|
+
| Level | Recovery | Use Case |
|
|
334
|
+
|-------|----------|----------|
|
|
335
|
+
| **L (Low)** | ~7% | Maximum data capacity, clean environment |
|
|
336
|
+
| **M (Medium)** | ~15% | Balanced (default) |
|
|
337
|
+
| **Q (Quartile)** | ~25% | Good for QR codes with logos |
|
|
338
|
+
| **H (High)** | ~30% | Best for damaged/dirty environments |
|
|
187
339
|
|
|
188
340
|
Higher levels allow QR codes to remain readable when damaged or have logos embedded.
|
|
189
341
|
|
|
190
|
-
|
|
342
|
+
---
|
|
191
343
|
|
|
192
|
-
|
|
344
|
+
## 📚 Documentation
|
|
193
345
|
|
|
194
|
-
|
|
195
|
-
git clone https://github.com/tranhuucanh/fastqr.git
|
|
196
|
-
cd fastqr
|
|
346
|
+
Complete usage guides for each platform:
|
|
197
347
|
|
|
198
|
-
|
|
199
|
-
|
|
348
|
+
- **[CLI Usage Guide](docs/CLI_USAGE.md)** - Complete command-line reference
|
|
349
|
+
- **[Ruby/Rails Usage Guide](docs/RUBY_USAGE.md)** - Ruby and Rails integration
|
|
350
|
+
- **[Node.js Usage Guide](docs/NODEJS_USAGE.md)** - Node.js, Express, and TypeScript
|
|
351
|
+
- **[PHP Usage Guide](docs/PHP_USAGE.md)** - PHP, Laravel, and WordPress integration
|
|
352
|
+
- **[Documentation Index](docs/README.md)** - Full documentation portal
|
|
200
353
|
|
|
201
|
-
|
|
202
|
-
mkdir build && cd build
|
|
203
|
-
cmake ..
|
|
204
|
-
make
|
|
354
|
+
---
|
|
205
355
|
|
|
206
|
-
|
|
207
|
-
./example_basic
|
|
356
|
+
## 🏗️ Architecture
|
|
208
357
|
|
|
209
|
-
|
|
210
|
-
make test
|
|
211
|
-
```
|
|
358
|
+
FastQR is built on battle-tested, industry-standard libraries:
|
|
212
359
|
|
|
213
|
-
|
|
360
|
+
- **[libqrencode](https://fukuchi.org/works/qrencode/)** (LGPL v2.1) - QR code bit matrix generation
|
|
361
|
+
- **[libpng](http://www.libpng.org/pub/png/libpng.html)** - Lightning-fast PNG encoding
|
|
362
|
+
- **[stb_image](https://github.com/nothings/stb)** (Public Domain) - Efficient image loading
|
|
214
363
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
│ ├── fastqr.cpp
|
|
223
|
-
│ └── cli.cpp
|
|
224
|
-
├── bindings/ # Language bindings
|
|
225
|
-
│ ├── ruby/
|
|
226
|
-
│ ├── nodejs/
|
|
227
|
-
│ └── php/
|
|
228
|
-
├── prebuilt/ # Pre-compiled binaries
|
|
229
|
-
│ ├── macos-arm64/
|
|
230
|
-
│ ├── macos-x86_64/
|
|
231
|
-
│ ├── linux-x86_64/
|
|
232
|
-
│ └── linux-arm64/
|
|
233
|
-
├── scripts/ # Build and install scripts
|
|
234
|
-
├── examples/ # Examples
|
|
235
|
-
├── cmake/ # CMake configs
|
|
236
|
-
└── LICENSE # LGPL 2.1
|
|
237
|
-
```
|
|
364
|
+
**Why so fast?**
|
|
365
|
+
- ⚡ Zero process forking overhead
|
|
366
|
+
- 🚀 Optimized native C++ core
|
|
367
|
+
- 💪 Batch mode processes multiple QR codes in a single call
|
|
368
|
+
- 🔥 Efficient memory management and image encoding
|
|
369
|
+
|
|
370
|
+
---
|
|
238
371
|
|
|
239
372
|
## 📄 License
|
|
240
373
|
|
|
241
374
|
FastQR is licensed under the **GNU Lesser General Public License v2.1 (LGPL-2.1)**.
|
|
242
375
|
|
|
243
|
-
This project uses:
|
|
244
|
-
- **libqrencode** (LGPL v2.1) - Copyright (C) 2006-2017 Kentaro Fukuchi
|
|
245
|
-
- **libpng** - PNG image encoding
|
|
246
|
-
- **stb_image** (Public Domain) - Sean Barrett's single-header image library
|
|
247
|
-
|
|
248
|
-
As required by the LGPL, you can obtain the source code and rebuild this library with modified versions of libqrencode. See [BUILD.md](BUILD.md) for instructions.
|
|
249
|
-
|
|
250
376
|
### LGPL Requirements
|
|
251
377
|
|
|
252
378
|
When using FastQR in your projects:
|
|
253
379
|
|
|
254
|
-
1. **Open Source Projects**:
|
|
255
|
-
2. **Closed Source/Commercial Projects**:
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
- Users must be able to replace
|
|
380
|
+
1. **Open Source Projects**: Use freely ✅
|
|
381
|
+
2. **Closed Source/Commercial Projects**: Use as a library, but:
|
|
382
|
+
- Include a copy of the LGPL license
|
|
383
|
+
- State that your software uses FastQR
|
|
384
|
+
- Users must be able to replace FastQR with a modified version
|
|
259
385
|
|
|
260
386
|
See [LICENSE](LICENSE) for full details.
|
|
261
387
|
|
|
388
|
+
---
|
|
389
|
+
|
|
262
390
|
## 🤝 Contributing
|
|
263
391
|
|
|
264
392
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -269,44 +397,52 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
269
397
|
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
270
398
|
5. Open a Pull Request
|
|
271
399
|
|
|
272
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for
|
|
400
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
401
|
+
|
|
402
|
+
---
|
|
273
403
|
|
|
274
404
|
## 🐛 Bug Reports
|
|
275
405
|
|
|
276
|
-
|
|
406
|
+
Found a bug? Please open an issue with:
|
|
277
407
|
- Your OS and version
|
|
278
408
|
- FastQR version
|
|
279
409
|
- Steps to reproduce
|
|
280
410
|
- Expected vs actual behavior
|
|
281
411
|
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## 🗺️ Roadmap
|
|
415
|
+
|
|
416
|
+
- [ ] Windows support
|
|
417
|
+
- [ ] SVG output format
|
|
418
|
+
- [ ] Python bindings
|
|
419
|
+
- [ ] QR code scanning/decoding
|
|
420
|
+
- [ ] Advanced batch processing options
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
282
424
|
## 📮 Contact
|
|
283
425
|
|
|
284
|
-
- GitHub
|
|
285
|
-
- Issues
|
|
426
|
+
- **GitHub**: [@tranhuucanh](https://github.com/tranhuucanh)
|
|
427
|
+
- **Issues**: [GitHub Issues](https://github.com/tranhuucanh/fastqr/issues)
|
|
428
|
+
|
|
429
|
+
---
|
|
286
430
|
|
|
287
431
|
## 🙏 Acknowledgments
|
|
288
432
|
|
|
433
|
+
Special thanks to:
|
|
289
434
|
- [libqrencode](https://fukuchi.org/works/qrencode/) by Kentaro Fukuchi
|
|
290
435
|
- [libpng](http://www.libpng.org/pub/png/libpng.html) by PNG Development Group
|
|
291
436
|
- [stb libraries](https://github.com/nothings/stb) by Sean Barrett
|
|
292
437
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
```
|
|
296
|
-
Generating 100 QR codes (500x500px): ~0.3 seconds
|
|
297
|
-
Generating 1000 QR codes (500x500px): ~3 seconds
|
|
438
|
+
---
|
|
298
439
|
|
|
299
|
-
|
|
300
|
-
```
|
|
440
|
+
<div align="center">
|
|
301
441
|
|
|
302
|
-
|
|
442
|
+
**Made with ❤️ by FastQR Project**
|
|
303
443
|
|
|
304
|
-
|
|
305
|
-
- [ ] SVG output
|
|
306
|
-
- [ ] Python bindings
|
|
307
|
-
- [ ] Batch processing API
|
|
308
|
-
- [ ] QR code scanning/decoding
|
|
444
|
+
*If FastQR saves you time, give us a star!* ⭐
|
|
309
445
|
|
|
310
|
-
|
|
446
|
+
[⬆ Back to top](#fastqr-)
|
|
311
447
|
|
|
312
|
-
|
|
448
|
+
</div>
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.22
|