@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 +28 -5
- package/dist/{chunk-2XQ44ZWR.js → chunk-3MPIZJSN.js} +318 -72
- package/dist/{chunk-R63XI7FS.js → chunk-4DZLRFGH.js} +1 -1
- package/dist/{chunk-NHYRCNMW.js → chunk-6UANVLO3.js} +2 -2
- package/dist/{chunk-2IRCHZCF.js → chunk-CJBGTYSB.js} +3 -3
- package/dist/{chunk-LQP2FYMK.js → chunk-DSH3OL5Q.js} +5 -2
- package/dist/{chunk-NOOFSAF4.js → chunk-F57L5MBU.js} +3 -3
- package/dist/{chunk-KOKPGEU4.js → chunk-HQ2FHXLJ.js} +2 -2
- package/dist/{chunk-HPM4IQQR.js → chunk-LYQ3KQSL.js} +18 -10
- package/dist/{chunk-PTXZQBLV.js → chunk-N33N54TN.js} +2 -2
- package/dist/fs/index.d.ts +18 -83
- package/dist/fs/index.js +9 -9
- package/dist/fs-atomic/index.js +3 -3
- package/dist/fs-base/index.d.ts +1 -1
- package/dist/fs-base/index.js +2 -2
- package/dist/fs-core/index.js +6 -6
- package/dist/fs-fetch/index.d.ts +2 -2
- package/dist/fs-fetch/index.js +8 -8
- package/dist/fs-size/index.js +5 -5
- package/dist/fs-tmp/index.js +7 -7
- package/dist/image/index.d.ts +190 -14
- package/dist/image/index.js +1 -1
- package/dist/index.js +9 -9
- package/dist/mime/index.d.ts +2 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.js +1 -1
- package/dist/types/stream.d.ts +2 -1
- package/package.json +4 -3
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
|
|
145
|
-
const metadata = await fs.getImageSpecs("
|
|
146
|
-
// 🔥
|
|
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
|
{
|