@d0paminedriven/fs 7.3.0 → 7.5.0

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.
package/README.md CHANGED
@@ -132,18 +132,41 @@ This implementation comes from a non-traditional developer with degrees in Bioch
132
132
  // Memory savings: 99.993%!
133
133
  ```
134
134
 
135
+ #### 🏆 Production Benchmark: PBR Texture Pipeline
136
+
137
+ **Real-world test with 99 professional PBR textures:**
138
+
139
+ ```ts
140
+ // Test setup: 99 PBR texture files
141
+ // - 75 JPEGs @ 4096×4096 (professional game/3D assets)
142
+ // - 24 PNGs @ 2048×2048 (normal maps, height maps, etc.)
143
+ // - Mix of diffuse, normal, roughness, metalness, AO maps
144
+
145
+ // Method used: getImageSpecs() with 24KB buffer
146
+ await fs.getImageSpecs(texturePath, 4096 * 6);
147
+
148
+ // Results:
149
+ Duration: 48.96ms for all 99 files
150
+ Average: 0.494ms per file
151
+ Throughput: 2,024 files/second
152
+
153
+ // Theoretical capacity:
154
+ // - 120,000+ textures per minute
155
+ // - Process entire AAA game asset library in seconds
156
+ ```
157
+
135
158
  #### Comprehensive Metadata Extraction
136
159
 
137
160
  ```typescript
138
161
  // Choose your weapon: Buffer or Stream
139
162
 
140
- // Stream-based (recommended for production):
141
- const metadata = await fs.getImageSpecsStream("massive-image.png");
163
+ // Stream-based with a configurable header size (recommended for production):
164
+ const metadata = await fs.getImageSpecsStream("massive-image.png", 4096);
142
165
  // ⚡ Sub-millisecond for any size file
143
166
 
144
- // Buffer-based (when you need the full buffer anyway):
145
- const metadata = await fs.getImageSpecs("image.png");
146
- // 🔥 Still blazing fast
167
+ // Buffer-based with configurable header size:
168
+ const metadata = await fs.getImageSpecs("texture.jpg", 4096 * 6);
169
+ // 🔥 Handles professional assets with extensive metadata
147
170
 
148
171
  // Returns rich metadata:
149
172
  {