fastqr 1.0.26 → 1.0.27

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -2
  3. data/CMakeLists.txt +1 -1
  4. data/CONTRIBUTING.md +7 -1
  5. data/NOTICE +1 -1
  6. data/README.md +208 -140
  7. data/VERSION +1 -1
  8. data/bindings/nodejs/README.md +201 -138
  9. data/bindings/nodejs/index.d.ts +18 -2
  10. data/bindings/nodejs/index.js +30 -3
  11. data/bindings/nodejs/lib/platform.js +20 -0
  12. data/bindings/nodejs/package.json +1 -1
  13. data/bindings/nodejs/prebuilt/macos-arm64/bin/fastqr +0 -0
  14. data/bindings/nodejs/test/test.js +20 -0
  15. data/bindings/php/fastqr_php.cpp +2 -0
  16. data/bindings/php/src/FastQR.php +17 -5
  17. data/bindings/php/tests/FastQRTest.php +18 -2
  18. data/bindings/ruby/extconf.rb +18 -0
  19. data/bindings/ruby/fastqr_ruby.cpp +13 -0
  20. data/bindings/ruby/lib/fastqr/platform.rb +18 -0
  21. data/bindings/ruby/lib/fastqr/version.rb +19 -1
  22. data/bindings/ruby/lib/fastqr.rb +18 -0
  23. data/bindings/ruby/prebuilt/linux-aarch64/bin/fastqr +0 -0
  24. data/bindings/ruby/prebuilt/linux-aarch64/include/fastqr.h +6 -0
  25. data/bindings/ruby/prebuilt/linux-aarch64.tar.gz +0 -0
  26. data/bindings/ruby/prebuilt/linux-x86_64/bin/fastqr +0 -0
  27. data/bindings/ruby/prebuilt/linux-x86_64/include/fastqr.h +6 -0
  28. data/bindings/ruby/prebuilt/linux-x86_64.tar.gz +0 -0
  29. data/bindings/ruby/prebuilt/macos-arm64/bin/fastqr +0 -0
  30. data/bindings/ruby/prebuilt/macos-arm64/include/fastqr.h +6 -0
  31. data/bindings/ruby/prebuilt/macos-arm64.tar.gz +0 -0
  32. data/docs/CLI_USAGE.md +74 -5
  33. data/docs/NODEJS_USAGE.md +43 -22
  34. data/docs/PHP_USAGE.md +35 -8
  35. data/docs/README.md +10 -14
  36. data/docs/RUBY_USAGE.md +47 -25
  37. data/include/fastqr.h +6 -0
  38. data/prebuilt/README.md +2 -8
  39. data/scripts/README.md +14 -23
  40. data/scripts/update-version.sh +0 -6
  41. data/src/cli.cpp +25 -0
  42. data/src/fastqr.cpp +134 -43
  43. data/verify_batch_input.txt +1000 -0
  44. metadata +3 -21
  45. data/BUILD.md +0 -418
  46. data/DISTRIBUTION.md +0 -730
  47. data/INSTALL.md +0 -171
  48. data/PREBUILT.md +0 -171
  49. data/bindings/ruby/prebuilt/macos-x86_64/bin/fastqr +0 -0
  50. data/bindings/ruby/prebuilt/macos-x86_64/include/fastqr.h +0 -147
  51. data/bindings/ruby/prebuilt/macos-x86_64/include/stb_image.h +0 -7988
  52. data/bindings/ruby/prebuilt/macos-x86_64/include/stb_image_write.h +0 -1724
  53. data/bindings/ruby/prebuilt/macos-x86_64.tar.gz +0 -0
  54. data/build.sh +0 -109
  55. data/composer.json +0 -35
  56. data/phpunit.xml +0 -18
  57. data/scripts/build-local.sh +0 -18
  58. data/scripts/install.sh +0 -87
  59. data/scripts/test-gem-local.sh +0 -64
  60. data/scripts/test-gem-manual.rb +0 -54
  61. data/scripts/test-npm-local.sh +0 -67
  62. data/scripts/test-npm-real.sh +0 -80
  63. data/test.sh +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 457b98912e41a7810a0f8c3d8f22965b517c6da7fb8bbe2ed06b969eda990603
4
- data.tar.gz: '063209c0e1f36e15b709dcf5129dd2902a48de17a4b57967791aea9e9924122b'
3
+ metadata.gz: 866d0e478a45615cf1d5faf0bc7ecdabe498433b519482f41d675b571ae23b0b
4
+ data.tar.gz: 83ee54578961cc01b2abb01bbaa340beac82c11fc75548adf9ce33d415a9523a
5
5
  SHA512:
6
- metadata.gz: 150aeb0c727ccc4915b09d65c38bcf7afa5a25f766bae315830096402fef9915e8ee21a88503cbbb94b24b843b9cead04e2aee178c5eddc2be7528e57555483c
7
- data.tar.gz: 3799f1bd5ea39d4daadb353874a122b3184c85e9294f082629ae8b90cbe90d4e85178d48874c8ff0d8c8a3cabf0b17c1cd8547b12b479ff4760e074d54977017
6
+ metadata.gz: 90f13d8fd8f729b010949f9f27e3fc6406cd7f368ccd02cd873c52b4cdc65988f0936bb16393df1255c8b4055adcf6998f10f42b9f9edc0c36d7cf555d3fc1fa
7
+ data.tar.gz: 0c6ce4732fd19d6105a342e7a99a9b817a9f6fc2385fe3f3c5e857b6d30139c14634e4abc6890e5b149378af89235c383d79e96075c4d733fb52745f468adc62
data/CHANGELOG.md CHANGED
@@ -43,8 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
43
 
44
44
  ### Documentation
45
45
  - Comprehensive README with examples
46
- - BUILD.md with detailed compilation instructions
47
- - DISTRIBUTION.md with publishing guides for all package managers
46
+ - Complete usage guides for CLI, Ruby, Node.js, and PHP
48
47
  - API documentation for all languages
49
48
 
50
49
  [1.0.0]: https://github.com/tranhuucanh/fastqr/releases/tag/v1.0.0
data/CMakeLists.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  cmake_minimum_required(VERSION 3.15)
2
- project(fastqr VERSION 1.0.26 LANGUAGES CXX C)
2
+ project(fastqr VERSION 1.0.27 LANGUAGES CXX C)
3
3
 
4
4
  set(CMAKE_CXX_STANDARD 14)
5
5
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
data/CONTRIBUTING.md CHANGED
@@ -55,7 +55,13 @@ Thank you for your interest in contributing to FastQR! This document provides gu
55
55
 
56
56
  ## 🏗️ Development Setup
57
57
 
58
- See [BUILD.md](BUILD.md) for detailed build instructions.
58
+ Build the project locally:
59
+
60
+ ```bash
61
+ mkdir build && cd build
62
+ cmake .. -DCMAKE_BUILD_TYPE=Debug
63
+ make
64
+ ```
59
65
 
60
66
  ## 📄 License
61
67
 
data/NOTICE CHANGED
@@ -8,4 +8,4 @@ This project statically links with:
8
8
  Copyright (C) 2006-2017 Kentaro Fukuchi
9
9
 
10
10
  As required by the LGPL, you can obtain and rebuild this library with modified
11
- versions of libqrencode. See BUILD.md for details.
11
+ versions of libqrencode. See the README for build instructions.
data/README.md CHANGED
@@ -1,24 +1,83 @@
1
1
  # FastQR
2
2
 
3
+ <div align="center">
4
+
5
+ <!-- Logo placeholder - add your logo here -->
6
+ <!-- <img src="docs/logo.png" alt="FastQR Logo" width="200"/> -->
7
+
8
+ **The fastest QR code generator on the planet.** 🚀
9
+
10
+ Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors. Logo embedding. Precise size control.
11
+
12
+ [![GitHub Stars](https://img.shields.io/github/stars/tranhuucanh/fastqr?style=social)](https://github.com/tranhuucanh/fastqr/stargazers)
13
+ [![GitHub Forks](https://img.shields.io/github/forks/tranhuucanh/fastqr?style=social)](https://github.com/tranhuucanh/fastqr/network/members)
14
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/tranhuucanh/fastqr)
15
+
16
+ [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Benchmarks](#-performance-benchmarks)
17
+
18
+ ---
19
+
20
+ ### 🛠️ Tech Stack & 📊 Stats
21
+
3
22
  [![License](https://img.shields.io/badge/License-LGPL%202.1-blue.svg)](LICENSE)
4
23
  [![C++](https://img.shields.io/badge/C++-14-blue.svg)](https://isocpp.org/)
5
24
  [![C](https://img.shields.io/badge/C-11-blue.svg)](https://en.wikipedia.org/wiki/C11_(C_standard_revision))
6
25
  [![CMake](https://img.shields.io/badge/CMake-3.10+-064F8C.svg)](https://cmake.org/)
7
26
  [![Shell](https://img.shields.io/badge/Shell-Bash-4EAA25.svg)](https://www.gnu.org/software/bash/)
8
27
  [![JavaScript](https://img.shields.io/badge/JavaScript-ES6+-F7DF1E.svg)](https://www.ecma-international.org/ecma-262/)
9
- [![Ruby](https://img.shields.io/badge/Ruby-Gem-red.svg)](https://rubygems.org/gems/fastqr)
10
- [![Node.js](https://img.shields.io/badge/Node.js-npm-green.svg)](https://www.npmjs.com/package/fastqr-pro)
11
- [![PHP](https://img.shields.io/badge/PHP-Composer-blue.svg)](https://packagist.org/packages/fastqr/fastqr)
12
28
 
13
- **The fastest QR code generator on the planet.** 🚀
29
+ 💎 **Ruby:** [![Gem](https://img.shields.io/badge/Gem-fastqr-red.svg)](https://rubygems.org/gems/fastqr) [![Gem Downloads](https://badgen.net/rubygems/dt/fastqr)](https://rubygems.org/gems/fastqr)
14
30
 
15
- Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors. Logo embedding. Precise size control.
31
+ 🟢 **Node.js:** [![npm](https://img.shields.io/badge/npm-fastqr--pro-green.svg)](https://www.npmjs.com/package/fastqr-pro) [![npm downloads](https://img.shields.io/npm/dt/fastqr-pro)](https://www.npmjs.com/package/fastqr-pro)
32
+
33
+ 🐘 **PHP:** [![Composer](https://img.shields.io/badge/Composer-fastqr-blue.svg)](https://packagist.org/packages/fastqr/fastqr) [![Packagist Downloads](https://img.shields.io/packagist/dt/fastqr/fastqr)](https://packagist.org/packages/fastqr/fastqr)
34
+
35
+ 📦 **CLI:** [![GitHub Downloads](https://img.shields.io/github/downloads/tranhuucanh/fastqr/total)](https://github.com/tranhuucanh/fastqr/releases)
36
+
37
+ </div>
38
+
39
+ ---
40
+
41
+ ## 📑 Table of Contents
42
+
43
+ - [Performance Benchmarks](#-performance-benchmarks)
44
+ - [Key Features](#-key-features)
45
+ - [Installation](#-installation)
46
+ - [Quick Start](#-quick-start)
47
+ - [API Reference](#-api-reference)
48
+ - [Documentation](#-documentation)
49
+ - [Architecture](#️-architecture)
50
+ - [License](#-license)
51
+ - [Contributing](#-contributing)
52
+ - [Bug Reports](#-bug-reports)
53
+ - [Support This Project](#-support-this-project)
54
+ - [Roadmap](#️-roadmap)
55
+ - [Contact & Support](#-contact--support)
56
+ - [Acknowledgments](#-acknowledgments)
16
57
 
17
58
  ---
18
59
 
19
60
  ## 🔥 Performance Benchmarks
20
61
 
21
- ### ⌨️ CLI Performance: FastQR vs qrencode
62
+ <div align="center">
63
+
64
+ **Generate 1,000 QR codes (500×500px)**
65
+
66
+ | Platform | FastQR Batch | Competitor | Competitor Time | 🚀 Speedup |
67
+ |----------|-------------:|------------|----------------:|-----------:|
68
+ | ⌨️ **CLI** | **0.37s** ⚡ | qrencode | 2.97s | **8x** |
69
+ | 💎 **Ruby** | **0.38s** ⚡ | rqrcode | 59.45s | **157x** 🏆 |
70
+ | 🟢 **Node.js** | **0.46s** ⚡ | qrcode | 17.25s | **37x** |
71
+ | 🐘 **PHP** | **0.64s** ⚡ | endroid/qr-code | 14.72s | **23x** |
72
+
73
+ **Average: 56x faster than popular alternatives!** 🎯
74
+
75
+ </div>
76
+
77
+ <details open>
78
+ <summary>📊 <b>CLI Performance: FastQR vs qrencode</b></summary>
79
+
80
+ <br/>
22
81
 
23
82
  *Task: Generate 1,000 QR codes (500×500px)*
24
83
 
@@ -29,9 +88,12 @@ Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors.
29
88
 
30
89
  **FastQR is 16% faster in sequential mode and 8x faster with batch mode!**
31
90
 
32
- ---
91
+ </details>
33
92
 
34
- ### 💎 Ruby Performance: FastQR vs rqrcode
93
+ <details open>
94
+ <summary>💎 <b>Ruby Performance: FastQR vs rqrcode</b></summary>
95
+
96
+ <br/>
35
97
 
36
98
  *Task: Generate 1,000 QR codes (500×500px)*
37
99
 
@@ -42,9 +104,12 @@ Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors.
42
104
 
43
105
  **FastQR is 17x faster in sequential mode and 157x faster with batch mode!**
44
106
 
45
- ---
107
+ </details>
108
+
109
+ <details open>
110
+ <summary>🟢 <b>Node.js Performance: FastQR vs qrcode</b></summary>
46
111
 
47
- ### 🟢 Node.js Performance: FastQR vs qrcode
112
+ <br/>
48
113
 
49
114
  *Task: Generate 1,000 QR codes (500×500px)*
50
115
 
@@ -55,9 +120,12 @@ Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors.
55
120
 
56
121
  **FastQR is 7x faster in sequential mode and 37x faster with batch mode!**
57
122
 
58
- ---
123
+ </details>
124
+
125
+ <details open>
126
+ <summary>🐘 <b>PHP Performance: FastQR vs endroid/qr-code</b></summary>
59
127
 
60
- ### 🐘 PHP Performance: FastQR vs endroid/qr-code
128
+ <br/>
61
129
 
62
130
  *Task: Generate 1,000 QR codes (500×500px)*
63
131
 
@@ -68,67 +136,72 @@ Generate 1,000 QR codes in **0.37 seconds**. Full UTF-8 support. Custom colors.
68
136
 
69
137
  **FastQR is 8.4x faster in sequential mode and 23x faster with batch mode!**
70
138
 
71
- ---
139
+ </details>
72
140
 
73
- ## 💪 Why FastQR Dominates
141
+ ---
74
142
 
75
- ### Speed Comparison Summary
143
+ ## 💪 Key Features
76
144
 
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** 🚀 |
145
+ <table width="100%">
146
+ <tr>
147
+ <td width="50%">
83
148
 
84
- **Average: FastQR with batch mode is 56x faster than popular alternatives!**
149
+ ### Performance
150
+ - **Up to 157x faster** than alternatives
151
+ - **Batch mode**: 1,000 QR codes in 0.37s
152
+ - Zero process forking overhead
153
+ - Optimized C++ core
85
154
 
86
- ---
155
+ </td>
156
+ <td width="50%">
87
157
 
88
- ## What Makes FastQR Special?
158
+ ### 🎨 Customization
159
+ - **Custom colors** (RGB for QR & background)
160
+ - **Logo embedding** with auto-scaling
161
+ - **Exact size control** (e.g., 2000×2000px)
162
+ - **Multiple formats**: PNG, JPG, WebP
89
163
 
90
- ### Features That Set Us Apart
164
+ </td>
165
+ </tr>
166
+ <tr>
167
+ <td width="50%">
91
168
 
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 |
169
+ ### 🌐 UTF-8 Support
170
+ - Vietnamese, Japanese, Chinese
171
+ - Emoji and special characters
172
+ - All Unicode characters supported
101
173
 
102
- ---
174
+ </td>
175
+ <td width="50%">
103
176
 
104
- ## 🚀 Key Features
177
+ ### 🔧 Multi-Language
178
+ - Ruby, Node.js, PHP, C++
179
+ - Native bindings for each language
180
+ - Consistent API across platforms
105
181
 
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++
182
+ </td>
183
+ </tr>
184
+ </table>
115
185
 
116
186
  ---
117
187
 
118
188
  ## 📦 Installation
119
189
 
120
- ### CLI Installation
190
+ <table>
191
+ <tr>
192
+ <td width="50%">
121
193
 
122
- **macOS (Homebrew):**
194
+ ### 🍎 macOS
123
195
  ```bash
124
196
  brew tap tranhuucanh/fastqr
125
197
  brew install fastqr
126
198
  ```
127
199
 
128
- **Linux (x86_64):**
200
+ ### 🐧 Linux
129
201
  ```bash
130
- # Download latest release (replace VERSION with latest version, e.g., 1.0.21)
131
- VERSION="1.0.21"
202
+ # x86_64
203
+ # Download latest release (replace VERSION with latest version, e.g., 1.0.26)
204
+ VERSION="1.0.26"
132
205
  wget https://github.com/tranhuucanh/fastqr/releases/download/v${VERSION}/fastqr-${VERSION}-linux-x86_64.tar.gz
133
206
  tar -xzf fastqr-${VERSION}-linux-x86_64.tar.gz
134
207
  sudo cp linux-x86_64/bin/fastqr /usr/local/bin/
@@ -136,186 +209,172 @@ sudo chmod +x /usr/local/bin/fastqr
136
209
 
137
210
  # Verify installation
138
211
  fastqr --version
139
- ```
140
212
 
141
- **Linux (ARM64/aarch64):**
142
- ```bash
143
- VERSION="1.0.21"
213
+ # ARM64
214
+ VERSION="1.0.26"
144
215
  wget https://github.com/tranhuucanh/fastqr/releases/download/v${VERSION}/fastqr-${VERSION}-linux-aarch64.tar.gz
145
216
  tar -xzf fastqr-${VERSION}-linux-aarch64.tar.gz
146
217
  sudo cp linux-aarch64/bin/fastqr /usr/local/bin/
147
218
  sudo chmod +x /usr/local/bin/fastqr
148
219
  ```
149
220
 
150
- ### Language Packages
221
+ </td>
222
+ <td width="50%">
151
223
 
152
- **Ruby:**
224
+ ### 💎 Ruby
153
225
  ```bash
154
226
  gem install fastqr
155
227
  ```
156
228
 
157
- **Node.js:**
229
+ ### 🟢 Node.js
158
230
  ```bash
159
231
  npm install fastqr-pro
160
232
  ```
161
233
 
162
- **PHP:**
234
+ ### 🐘 PHP
163
235
  ```bash
164
236
  composer require fastqr/fastqr
165
237
  ```
166
238
 
167
- ### Build from Source
168
-
239
+ ### 🔨 Build from Source
169
240
  ```bash
170
- # Install dependencies
171
- # macOS:
172
- brew install qrencode libpng cmake
173
-
174
- # Ubuntu/Debian:
175
- sudo apt-get install libqrencode-dev libpng-dev cmake build-essential
176
-
177
- # Build
178
241
  git clone https://github.com/tranhuucanh/fastqr.git
179
- cd fastqr
180
- mkdir build && cd build
181
- cmake ..
182
- make
183
- sudo make install
242
+ cd fastqr && mkdir build && cd build
243
+ cmake .. && make && sudo make install
184
244
  ```
185
245
 
186
- See [INSTALL.md](INSTALL.md) for more options.
246
+ </td>
247
+ </tr>
248
+ </table>
187
249
 
188
250
  ---
189
251
 
190
252
  ## 🎯 Quick Start
191
253
 
192
254
  ### CLI
193
-
194
- **Single QR Code:**
195
255
  ```bash
256
+ # Single QR code
196
257
  fastqr "Hello World" output.png
197
- fastqr -s 500 -f 255,0,0 "Red QR" red.png
198
- fastqr -s 500 -f 255,0,0 -b 142,142,142 "Red QR & Gray" red_and_gray.png
199
- fastqr -l logo.png "QR with Logo" branded.png
200
- ```
201
258
 
202
- **Batch Mode (8x faster!):**
203
- ```bash
204
- # Create batch.txt with one text per line
205
- echo "https://example.com/user/1" > batch.txt
206
- echo "https://example.com/user/2" >> batch.txt
207
- # ... add 1000 URLs
259
+ # With custom colors
260
+ fastqr -s 500 -f 255,0,0 -b 255,255,200 "Red QR" red.png
208
261
 
209
- # Generate 1,000 QR codes in 0.37 seconds ⚡
210
- fastqr -F batch.txt output_dir/
211
- ```
262
+ # With margin (ISO standard: 4 modules)
263
+ fastqr -s 400 --margin-modules 4 "QR with margin" margin.png
212
264
 
213
- ---
265
+ # With logo
266
+ fastqr -l logo.png "QR with Logo" branded.png
267
+
268
+ # Batch mode (8x faster!)
269
+ fastqr -F urls.txt output_dir/
270
+ ```
214
271
 
215
- ### Ruby
272
+ <details>
273
+ <summary>💎 <b>Ruby</b></summary>
216
274
 
217
275
  ```ruby
218
276
  require 'fastqr'
219
277
 
220
- # Single QR code
278
+ # Single QR
221
279
  FastQR.generate("Hello World", "qr.png", size: 500)
222
280
 
223
- # Batch mode - 157x faster than rqrcode! 🚀
281
+ # Batch mode (157x faster!)
224
282
  urls = (1..1000).map { |i| "https://example.com/user/#{i}" }
225
283
  FastQR.generate_batch(urls, "output/")
226
- # ⚡ Done in 0.38 seconds! (vs 59.45s with rqrcode)
227
284
 
228
- # Custom colors and logo
285
+ # With colors and logo
229
286
  FastQR.generate("https://example.com", "branded.png",
230
287
  size: 800,
231
- foreground: [255, 0, 0], # Red QR code
232
- background: [255, 255, 200], # Light yellow background
288
+ foreground: [255, 0, 0],
289
+ background: [255, 255, 200],
233
290
  logo: "logo.png",
234
291
  logoSize: 20,
235
- errorLevel: "H" # High error correction for logos
292
+ errorLevel: "H"
236
293
  )
237
294
  ```
238
295
 
239
- ---
296
+ [Full Ruby Guide →](docs/RUBY_USAGE.md)
297
+ </details>
240
298
 
241
- ### Node.js
299
+ <details>
300
+ <summary>🟢 <b>Node.js</b></summary>
242
301
 
243
302
  ```javascript
244
- const fastqr = require('fastqr');
303
+ const fastqr = require('fastqr-pro');
245
304
 
246
- // Single QR code
305
+ // Single QR
247
306
  fastqr.generate('Hello World', 'qr.png', { size: 500 });
248
307
 
249
- // Batch mode - 37x faster than qrcode! 🚀
250
- const urls = Array.from({length: 1000}, (_, i) =>
251
- `https://example.com/user/${i+1}`
252
- );
308
+ // Batch mode (37x faster!)
309
+ const urls = Array.from({length: 1000}, (_, i) => `https://example.com/user/${i+1}`);
253
310
  fastqr.generateBatch(urls, 'output/');
254
- // ⚡ Done in 0.46 seconds! (vs 17.25s with qrcode)
255
311
 
256
- // Custom colors and logo
312
+ // With colors and logo
257
313
  fastqr.generate('https://example.com', 'branded.png', {
258
314
  size: 800,
259
- foreground: [255, 0, 0], // Red QR code
260
- background: [255, 255, 200], // Light yellow background
315
+ foreground: [255, 0, 0],
316
+ background: [255, 255, 200],
261
317
  logo: 'logo.png',
262
318
  logoSize: 20,
263
- errorLevel: 'H' // High error correction for logos
319
+ errorLevel: 'H'
264
320
  });
265
321
  ```
266
322
 
267
- ---
323
+ [Full Node.js Guide →](docs/NODEJS_USAGE.md)
324
+ </details>
268
325
 
269
- ### PHP
326
+ <details>
327
+ <summary>🐘 <b>PHP</b></summary>
270
328
 
271
329
  ```php
272
330
  use FastQR\FastQR;
273
331
 
274
- // Single QR code
332
+ // Single QR
275
333
  FastQR::generate('Hello World', 'qr.png', ['size' => 500]);
276
334
 
277
- // Batch mode - Lightning fast!
335
+ // Batch mode (23x faster!)
278
336
  $urls = array_map(fn($i) => "https://example.com/user/$i", range(1, 1000));
279
337
  FastQR::generateBatch($urls, 'output/');
280
- // Done in ~0.4 seconds!
281
338
 
282
- // Custom colors and logo
339
+ // With colors and logo
283
340
  FastQR::generate('https://example.com', 'branded.png', [
284
341
  'size' => 800,
285
- 'foreground' => [255, 0, 0], // Red QR code
286
- 'background' => [255, 255, 200], // Light yellow background
342
+ 'foreground' => [255, 0, 0],
343
+ 'background' => [255, 255, 200],
287
344
  'logo' => 'logo.png',
288
345
  'logoSize' => 20,
289
- 'errorLevel' => 'H' // High error correction for logos
346
+ 'errorLevel' => 'H'
290
347
  ]);
291
348
  ```
292
349
 
293
- ---
350
+ [Full PHP Guide →](docs/PHP_USAGE.md)
351
+ </details>
294
352
 
295
- ### C++
353
+ <details>
354
+ <summary>⚙️ <b>C++</b></summary>
296
355
 
297
356
  ```cpp
298
357
  #include <fastqr.h>
299
358
 
300
- // Single QR code
359
+ // Single QR
301
360
  fastqr::QROptions options;
302
361
  options.size = 500;
303
362
  fastqr::generate("Hello World", "qr.png", options);
304
363
 
305
- // Batch mode - Blazing fast! 🚀
364
+ // Batch mode
306
365
  std::vector<std::string> urls;
307
366
  for (int i = 1; i <= 1000; i++) {
308
367
  urls.push_back("https://example.com/user/" + std::to_string(i));
309
368
  }
310
369
  fastqr::generateBatch(urls, "output/", options);
311
- // Done in ~0.4 seconds!
312
370
  ```
371
+ </details>
313
372
 
314
373
  ---
315
374
 
316
375
  ## 📖 API Reference
317
376
 
318
- ### QROptions
377
+ ### Common Options
319
378
 
320
379
  | Option | Type | Default | Description |
321
380
  |--------|------|---------|-------------|
@@ -328,6 +387,8 @@ fastqr::generateBatch(urls, "output/", options);
328
387
  | `logoSize` | int | 20 | Logo size as percentage (1-50) |
329
388
  | `quality` | int | 95 | Image quality for lossy formats (1-100) |
330
389
  | `format` | string | 'png' | Output format: png, jpg, webp |
390
+ | `margin` | int | 0 | Margin (quiet zone) in pixels (absolute) |
391
+ | `marginModules` | int | 4 | Margin in modules (relative, ISO standard) |
331
392
 
332
393
  ### Error Correction Levels
333
394
 
@@ -412,29 +473,34 @@ Found a bug? Please open an issue with:
412
473
 
413
474
  ---
414
475
 
476
+ ## 💖 Support This Project
477
+
478
+ If FastQR helps you save time and money, consider supporting its development:
479
+ - ⭐ Star this repository
480
+ - 🐛 Report bugs and suggest features
481
+ - 📖 Improve documentation
482
+ - 💬 Share FastQR with others
483
+ - ✍️ Write a blog post or tutorial
484
+
485
+ ---
486
+
415
487
  ## 🗺️ Roadmap
416
488
 
417
- - [ ] Windows support
418
- - [ ] SVG output format
419
- - [ ] Python bindings
420
- - [ ] QR code scanning/decoding
421
- - [ ] Advanced batch processing options
489
+ **Coming Soon:** Windows support • SVG output • Python bindings • Advanced batch processing options
422
490
 
423
491
  ---
424
492
 
425
- ## 📮 Contact
493
+ ## 📮 Contact & Support
426
494
 
427
- - **GitHub**: [@tranhuucanh](https://github.com/tranhuucanh)
428
- - **Issues**: [GitHub Issues](https://github.com/tranhuucanh/fastqr/issues)
495
+ **GitHub:** [@tranhuucanh](https://github.com/tranhuucanh) • [Issues](https://github.com/tranhuucanh/fastqr/issues) • [Discussions](https://github.com/tranhuucanh/fastqr/discussions)
429
496
 
430
497
  ---
431
498
 
432
499
  ## 🙏 Acknowledgments
433
500
 
434
- Special thanks to:
435
- - [libqrencode](https://fukuchi.org/works/qrencode/) by Kentaro Fukuchi
436
- - [libpng](http://www.libpng.org/pub/png/libpng.html) by PNG Development Group
437
- - [stb libraries](https://github.com/nothings/stb) by Sean Barrett
501
+ Built with: **[libqrencode](https://fukuchi.org/works/qrencode/)** by Kentaro Fukuchi • **[libpng](http://www.libpng.org/pub/png/libpng.html)** by PNG Development Group • **[stb](https://github.com/nothings/stb)** by Sean Barrett
502
+
503
+ Thanks to all [contributors](https://github.com/tranhuucanh/fastqr/graphs/contributors)! 🎉
438
504
 
439
505
  ---
440
506
 
@@ -444,6 +510,8 @@ Special thanks to:
444
510
 
445
511
  *If FastQR saves you time, give us a star!* ⭐
446
512
 
447
- [ Back to top](#fastqr-)
513
+ [![Star History Chart](https://api.star-history.com/svg?repos=tranhuucanh/fastqr&type=Date)](https://star-history.com/#tranhuucanh/fastqr&Date)
514
+
515
+ [⬆ Back to top](#fastqr)
448
516
 
449
- </div>
517
+ </div>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.26
1
+ 1.0.27