@office-open/pptx 0.6.1 → 0.6.2
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 +30 -17
- package/dist/index.d.mts +214 -226
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +50 -3229
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -81,29 +81,42 @@ Performance vs [PptxGenJS](https://github.com/gitbrent/PptxGenJS) (higher hz is
|
|
|
81
81
|
|
|
82
82
|
**Object Creation (no pack)**
|
|
83
83
|
|
|
84
|
-
| Scenario | @office-open/pptx |
|
|
85
|
-
| ------------------------- | ----------------: |
|
|
86
|
-
| Simple (2 shapes) |
|
|
87
|
-
| Styled shapes (20 shapes) |
|
|
88
|
-
| Table (10x5) | 2.
|
|
89
|
-
| Full featured |
|
|
84
|
+
| Scenario | @office-open/pptx | PptxGenJS | Speedup |
|
|
85
|
+
| ------------------------- | ----------------: | ---------: | -------: |
|
|
86
|
+
| Simple (2 shapes) | 4.77M ops/s | 526K ops/s | **9.1x** |
|
|
87
|
+
| Styled shapes (20 shapes) | 274K ops/s | 79K ops/s | **3.5x** |
|
|
88
|
+
| Table (10x5) | 2.17M ops/s | 27K ops/s | **80x** |
|
|
89
|
+
| Full featured | 188K ops/s | 17K ops/s | **11x** |
|
|
90
90
|
|
|
91
91
|
**Create + toBuffer (end-to-end)**
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
93
|
+
@office-open/pptx defaults to DEFLATE compression (smaller files). PptxGenJS always uses STORE (no compression). Speedup is based on same-compression (STORE vs STORE) comparison.
|
|
94
|
+
|
|
95
|
+
| Scenario | @office-open/pptx (DEFLATE) | @office-open/pptx (STORE) | PptxGenJS | Speedup |
|
|
96
|
+
| ------------------------- | --------------------------: | ------------------------: | ----------: | -------: |
|
|
97
|
+
| Simple (2 shapes) | 409 ops/s | 2,127 ops/s | 1,429 ops/s | **1.5x** |
|
|
98
|
+
| Styled shapes (20 shapes) | 383 ops/s | 1,599 ops/s | 1,127 ops/s | **1.4x** |
|
|
99
|
+
| Table (10x5) | 420 ops/s | 1,886 ops/s | 943 ops/s | **2.0x** |
|
|
100
|
+
| Full featured | 474 ops/s | 1,275 ops/s | 750 ops/s | **1.7x** |
|
|
99
101
|
|
|
100
102
|
**Large Files — Create + toBuffer**
|
|
101
103
|
|
|
102
|
-
| Scenario | @office-open/pptx |
|
|
103
|
-
| --------------------- |
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
104
|
+
| Scenario | @office-open/pptx (DEFLATE) | @office-open/pptx (STORE) | PptxGenJS | Speedup |
|
|
105
|
+
| --------------------- | --------------------------: | ------------------------: | --------: | -------: |
|
|
106
|
+
| 30 slides × 20 shapes | 73 ops/s | 122 ops/s | 124 ops/s | 1.0x |
|
|
107
|
+
| 100×10 table | 160 ops/s | 242 ops/s | 129 ops/s | **1.9x** |
|
|
108
|
+
| 50 slides full | 54 ops/s | 138 ops/s | 111 ops/s | **1.2x** |
|
|
109
|
+
|
|
110
|
+
**Large File (~100MB) — Mixed Content**
|
|
111
|
+
|
|
112
|
+
100 slides × (5 shapes + 2 unique images + 5×5 table). Speedup is vs PptxGenJS.
|
|
113
|
+
|
|
114
|
+
| Method | Speed | Speedup |
|
|
115
|
+
| --------------------------------- | ---------: | -------: |
|
|
116
|
+
| @office-open/pptx (DEFLATE sync) | 1.86 ops/s | 4.0x |
|
|
117
|
+
| @office-open/pptx (DEFLATE async) | 3.45 ops/s | **7.3x** |
|
|
118
|
+
| @office-open/pptx (STORE sync) | 1.91 ops/s | 4.1x |
|
|
119
|
+
| PptxGenJS | 0.47 ops/s | |
|
|
107
120
|
|
|
108
121
|
## Examples
|
|
109
122
|
|