roo-oxide 0.0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 40ed65dba754a000c12af3ab2834a13afcbc3a99396985546a32d1bed9c2fd7d
4
+ data.tar.gz: 1007c28d4ba5e53adf3c7a1d3a7290e0be6cb5cf56acc50491baa0c8538538b2
5
+ SHA512:
6
+ metadata.gz: 746f4e5f517325c415350b0103e698e2f846433ad44f2a601dc943cd0d8484474d808144f2f33820799ffc20fe4b355ee5848a75838846cd04164020dcd3199c
7
+ data.tar.gz: 89ae1d185d025e0a086c370cfecbfd9ab7cc1f0e56f70eb3608a2127d586cb80bbb318bf0a360649d0afcb95c1631b7293e07fe6117ae1ff90c682bc8e0e819f
data/CHANGELOG.md ADDED
@@ -0,0 +1,63 @@
1
+ # Changelog
2
+
3
+ ## [0.0.2](https://github.com/salasebas/roo-oxide/compare/v0.0.1...v0.0.2) (2026-11-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * name the native Roo accelerator roo-oxide ([#78](https://github.com/salasebas/roo-oxide/issues/78)) ([6a67945](https://github.com/salasebas/roo-oxide/commit/6a6794599b3fe2ff3c68d11b82b0c78f9b812c1f))
9
+ * read values 2x faster than streaming with an opt-in Roo::Calamine.each_row_values ([#12](https://github.com/salasebas/roo-oxide/issues/12)) ([c4d02de](https://github.com/salasebas/roo-oxide/commit/c4d02de37458641a9e24db0de0d3b5eef7da5927))
10
+
11
+
12
+ ### Performance Improvements
13
+
14
+ * build cell coordinates in Rust for 3-13% faster reads ([#13](https://github.com/salasebas/roo-oxide/issues/13)) ([42a57f5](https://github.com/salasebas/roo-oxide/commit/42a57f5d044000fda04022e8de500d7fbb5deb53))
15
+ * build cell coordinates in Rust instead of Coordinate.new ([42a57f5](https://github.com/salasebas/roo-oxide/commit/42a57f5d044000fda04022e8de500d7fbb5deb53))
16
+ * build roo cells without running their Ruby constructors ([5f4561a](https://github.com/salasebas/roo-oxide/commit/5f4561a3821fc94f3c63c8eb1d3bfd273f7cffc7))
17
+ * cut clean row iteration time by 62% ([#70](https://github.com/salasebas/roo-oxide/issues/70)) ([43914e9](https://github.com/salasebas/roo-oxide/commit/43914e90cc018ba07fcc29f92d3e2a866ab3eccb))
18
+ * cut each_row_values peak memory by up to 30% by converting rows straight to values ([#23](https://github.com/salasebas/roo-oxide/issues/23)) ([82c2d69](https://github.com/salasebas/roo-oxide/commit/82c2d693b905df0d1aba4b195e930b898b92b34d))
19
+ * cut IO workbook streaming memory by 53-58% ([#56](https://github.com/salasebas/roo-oxide/issues/56)) ([735e7b0](https://github.com/salasebas/roo-oxide/commit/735e7b00b6c8e335704492a5fdc5fa92d27312ed))
20
+ * cut parse allocations by 200k and small cell lookup time by 20% ([#42](https://github.com/salasebas/roo-oxide/issues/42)) ([fdb6a93](https://github.com/salasebas/roo-oxide/commit/fdb6a9335d53d7c8117bce8d47b1e448dce81cf5))
21
+ * cut peak memory 11–19% (65 MiB) on workbooks with many unique strings by extracting sharedStrings.xml natively ([#37](https://github.com/salasebas/roo-oxide/issues/37)) ([7722a73](https://github.com/salasebas/roo-oxide/commit/7722a733eef5ca146d6ea4d5639aaf36fe22d1f8))
22
+ * cut peak memory of row, column, and cell reads by up to 26% with 20-byte native records ([#32](https://github.com/salasebas/roo-oxide/issues/32)) ([f165dc5](https://github.com/salasebas/roo-oxide/commit/f165dc5048e5061c9f5a05ba60256f0309670ee9))
23
+ * cut row reads by parsing plain cells directly ([fd71931](https://github.com/salasebas/roo-oxide/commit/fd7193170749a7462e8450d131e501317aad5c9b))
24
+ * cut small-workbook opening time by 37% ([#60](https://github.com/salasebas/roo-oxide/issues/60)) ([2cd40eb](https://github.com/salasebas/roo-oxide/commit/2cd40eb5e3c63839dcfdd9b28ca76567f21916ac))
25
+ * cut temporal CSV and formatted read times by 46–66% ([#71](https://github.com/salasebas/roo-oxide/issues/71)) ([21f9da6](https://github.com/salasebas/roo-oxide/commit/21f9da66f1260eb41469f1b6ef57a98b8d57f871))
26
+ * cut unique-string document reads by 25–42% ([#61](https://github.com/salasebas/roo-oxide/issues/61)) ([2660f9a](https://github.com/salasebas/roo-oxide/commit/2660f9a113800fdb6819cd6ecf77193f329227d2))
27
+ * cut unique-string peak memory 23–43% by deferring HTML strings ([#44](https://github.com/salasebas/roo-oxide/issues/44)) ([7806c6f](https://github.com/salasebas/roo-oxide/commit/7806c6fe40f9f52e9aa048be186d4a79ec24016a))
28
+ * export YAML, XML and Matrix 19–51× faster ([#58](https://github.com/salasebas/roo-oxide/issues/58)) ([e979933](https://github.com/salasebas/roo-oxide/commit/e979933c97338a768bc606d7b374f50621081481))
29
+ * hand each_row_streaming the native row array directly ([bf37bc7](https://github.com/salasebas/roo-oxide/commit/bf37bc717c51f43f1b9a8745ff066f42673d55fd))
30
+ * make each 8× faster on sparse sheets built whole by indexing their cells by row ([#30](https://github.com/salasebas/roo-oxide/issues/30)) ([f915c14](https://github.com/salasebas/roo-oxide/commit/f915c14ad69325988b7006627652ba736ca9738f))
31
+ * make each and parse(headers: true) 2–2.6× faster with half the memory by reading rows from the native records ([#25](https://github.com/salasebas/roo-oxide/issues/25)) ([e5ae0a9](https://github.com/salasebas/roo-oxide/commit/e5ae0a91ab814e5aa6eb2cd70cd4e31fcfc34b87))
32
+ * make each without options up to 47% faster on large sheets ([#18](https://github.com/salasebas/roo-oxide/issues/18)) ([739f02c](https://github.com/salasebas/roo-oxide/commit/739f02c5fed5f46c074a91776ba62180a75bc0d3))
33
+ * make header iteration as fast as parse ([#57](https://github.com/salasebas/roo-oxide/issues/57)) ([03f8520](https://github.com/salasebas/roo-oxide/commit/03f8520a59ceb938a2f357ab2dad6a8fb0e27811))
34
+ * make parse(headers: true) 2x faster by grouping the cells hash in one pass ([#14](https://github.com/salasebas/roo-oxide/issues/14)) ([1d15aae](https://github.com/salasebas/roo-oxide/commit/1d15aae5d0ef83413be288157f012e517c35e54f))
35
+ * make single-cell reads 2x faster with 3x less memory by building cells lazily ([#17](https://github.com/salasebas/roo-oxide/issues/17)) ([c2417fb](https://github.com/salasebas/roo-oxide/commit/c2417fb3238d76da4fe30bd437ea95b2859bc604))
36
+ * read columns 2.6–8.4× faster with half the memory from the native records ([#31](https://github.com/salasebas/roo-oxide/issues/31)) ([8b0b683](https://github.com/salasebas/roo-oxide/commit/8b0b683935b3ec7f78513f360221d4eb208a5638))
37
+ * read hyperlinks and merged ranges natively instead of loading the whole sheet into Nokogiri ([29e5fd6](https://github.com/salasebas/roo-oxide/commit/29e5fd64ce4e1a36d11b5eee7a48fc75fa49e792))
38
+ * read row values and random cells 30-40% faster by parsing each tag's attributes once ([#22](https://github.com/salasebas/roo-oxide/issues/22)) ([afd5ad1](https://github.com/salasebas/roo-oxide/commit/afd5ad13b88670eefa4647ce5b41e960d500b04f))
39
+ * read sheets with hyperlinks or expanded merged ranges 30-60% faster in up to 20x less memory ([#26](https://github.com/salasebas/roo-oxide/issues/26)) ([29e5fd6](https://github.com/salasebas/roo-oxide/commit/29e5fd64ce4e1a36d11b5eee7a48fc75fa49e792))
40
+ * read small workbook rows 8–13% faster with in-memory metadata ([#45](https://github.com/salasebas/roo-oxide/issues/45)) ([eb7c4e9](https://github.com/salasebas/roo-oxide/commit/eb7c4e92ee31f981a6ffeaf32b7528ddba40125e))
41
+ * read small worksheets 11% faster natively with lazy ZIP inflation ([#43](https://github.com/salasebas/roo-oxide/issues/43)) ([65bd561](https://github.com/salasebas/roo-oxide/commit/65bd56137023b87c5e588ee6f9817191fe84f646))
42
+ * read workbooks full of unique or rich-text strings 4-17x faster by parsing shared strings natively ([#27](https://github.com/salasebas/roo-oxide/issues/27)) ([de00e34](https://github.com/salasebas/roo-oxide/commit/de00e3429d3d6d8b2a4a76e7db6f5ea3d9520f52))
43
+ * read worksheets from a copy of the xlsx instead of roo's extracted files ([77c232b](https://github.com/salasebas/roo-oxide/commit/77c232bfd736e85257782c767a48c73b6adec433))
44
+ * read worksheets straight from a copy of the xlsx zip, with up to 60% less peak memory on large files ([#28](https://github.com/salasebas/roo-oxide/issues/28)) ([77c232b](https://github.com/salasebas/roo-oxide/commit/77c232bfd736e85257782c767a48c73b6adec433))
45
+ * reduce Array row iteration overhead ([#59](https://github.com/salasebas/roo-oxide/issues/59)) ([5ab8230](https://github.com/salasebas/roo-oxide/commit/5ab823065464f9c38dbbe9f6f55b87e4ac5eb76f))
46
+ * reduce native cell construction overhead ([c974479](https://github.com/salasebas/roo-oxide/commit/c9744797ca42b46787479195201a6863e32b6856))
47
+ * reduce row-read overhead by parsing plain cells directly ([#69](https://github.com/salasebas/roo-oxide/issues/69)) ([fd71931](https://github.com/salasebas/roo-oxide/commit/fd7193170749a7462e8450d131e501317aad5c9b))
48
+ * reduce single-cell read latency on small sheets ([#73](https://github.com/salasebas/roo-oxide/issues/73)) ([194b149](https://github.com/salasebas/roo-oxide/commit/194b149d64a2682fa43fc54319a640dfe4eb300e))
49
+ * speed up each_row_values 7–9% and each, cell and parse 3–9% by reading common cell attributes on a fast path ([#36](https://github.com/salasebas/roo-oxide/issues/36)) ([d98ff8a](https://github.com/salasebas/roo-oxide/commit/d98ff8ac9ba96e30badab264e5e37a41029fe9cc))
50
+ * speed up hyperlink reads and row iteration ([#72](https://github.com/salasebas/roo-oxide/issues/72)) ([4f47c26](https://github.com/salasebas/roo-oxide/commit/4f47c264ae9ead7f83dbc5e3c4596d53f3172b55))
51
+ * speed up initial temporal scans 40–42% with 31–33% less memory ([#41](https://github.com/salasebas/roo-oxide/issues/41)) ([c974479](https://github.com/salasebas/roo-oxide/commit/c9744797ca42b46787479195201a6863e32b6856))
52
+ * stream rows 7–18% faster by yielding the native row array without copying it ([#35](https://github.com/salasebas/roo-oxide/issues/35)) ([bf37bc7](https://github.com/salasebas/roo-oxide/commit/bf37bc717c51f43f1b9a8745ff066f42673d55fd))
53
+ * stream tall sheets ~10% faster by handing Ruby one row at a time ([#24](https://github.com/salasebas/roo-oxide/issues/24)) ([4370a4b](https://github.com/salasebas/roo-oxide/commit/4370a4bac1656b01ff976b3815f9eb382101c83b))
54
+ * stream xlsx 30% faster by building roo cells without their constructors ([#15](https://github.com/salasebas/roo-oxide/issues/15)) ([5f4561a](https://github.com/salasebas/roo-oxide/commit/5f4561a3821fc94f3c63c8eb1d3bfd273f7cffc7))
55
+ * write to_csv 2–22× faster with byte-identical output by walking the cells once ([#29](https://github.com/salasebas/roo-oxide/issues/29)) ([2094b39](https://github.com/salasebas/roo-oxide/commit/2094b39d9259dd1787b457a4d4c6dff9df7e6cf1))
56
+ * write to_csv 2.2–3.9× faster with up to 83% less peak memory from the native records ([#38](https://github.com/salasebas/roo-oxide/issues/38)) ([8293459](https://github.com/salasebas/roo-oxide/commit/829345998667a208d1c76abc26f4242f2c1a2bd8))
57
+
58
+ ## 0.0.1 (2026-11-10)
59
+
60
+
61
+ ### Features
62
+
63
+ * make roo read xlsx files 4-12x faster with identical results ([#1](https://github.com/salasebas/roo-calamine/issues/1)) ([dce0aa4](https://github.com/salasebas/roo-calamine/commit/dce0aa4737b6e376ef01eb4f2aa8f602331d4d0b))
data/Cargo.lock ADDED
@@ -0,0 +1,341 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "adler2"
7
+ version = "2.0.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
10
+
11
+ [[package]]
12
+ name = "aho-corasick"
13
+ version = "1.1.5"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
16
+ dependencies = [
17
+ "memchr",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "bindgen"
22
+ version = "0.72.1"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
25
+ dependencies = [
26
+ "bitflags",
27
+ "cexpr",
28
+ "clang-sys",
29
+ "itertools",
30
+ "proc-macro2",
31
+ "quote",
32
+ "regex",
33
+ "rustc-hash",
34
+ "shlex",
35
+ "syn",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "bitflags"
40
+ version = "2.13.2"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
43
+
44
+ [[package]]
45
+ name = "cexpr"
46
+ version = "0.6.0"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
49
+ dependencies = [
50
+ "nom",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "cfg-if"
55
+ version = "1.0.5"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
58
+
59
+ [[package]]
60
+ name = "clang-sys"
61
+ version = "1.9.1"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a"
64
+ dependencies = [
65
+ "glob",
66
+ "libc",
67
+ "libloading",
68
+ ]
69
+
70
+ [[package]]
71
+ name = "crc32fast"
72
+ version = "1.5.5"
73
+ source = "registry+https://github.com/rust-lang/crates.io-index"
74
+ checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
75
+ dependencies = [
76
+ "cfg-if",
77
+ ]
78
+
79
+ [[package]]
80
+ name = "either"
81
+ version = "1.19.0"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
84
+
85
+ [[package]]
86
+ name = "flate2"
87
+ version = "1.1.11"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4"
90
+ dependencies = [
91
+ "crc32fast",
92
+ "miniz_oxide",
93
+ "zlib-rs",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "glob"
98
+ version = "0.3.4"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
101
+
102
+ [[package]]
103
+ name = "itertools"
104
+ version = "0.13.0"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
107
+ dependencies = [
108
+ "either",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "lazy_static"
113
+ version = "1.5.1"
114
+ source = "registry+https://github.com/rust-lang/crates.io-index"
115
+ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
116
+
117
+ [[package]]
118
+ name = "libc"
119
+ version = "0.2.191"
120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
121
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
122
+
123
+ [[package]]
124
+ name = "libloading"
125
+ version = "0.8.9"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
128
+ dependencies = [
129
+ "cfg-if",
130
+ "windows-link",
131
+ ]
132
+
133
+ [[package]]
134
+ name = "magnus"
135
+ version = "0.9.3"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "40ef424404d166cbb71c8b8d19c9c589c748c4547c1afa1928c5504299f6c713"
138
+ dependencies = [
139
+ "magnus-macros",
140
+ "rb-sys",
141
+ "rb-sys-env",
142
+ "seq-macro",
143
+ ]
144
+
145
+ [[package]]
146
+ name = "magnus-macros"
147
+ version = "0.9.1"
148
+ source = "registry+https://github.com/rust-lang/crates.io-index"
149
+ checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
150
+ dependencies = [
151
+ "proc-macro2",
152
+ "quote",
153
+ "syn",
154
+ ]
155
+
156
+ [[package]]
157
+ name = "memchr"
158
+ version = "2.8.3"
159
+ source = "registry+https://github.com/rust-lang/crates.io-index"
160
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
161
+
162
+ [[package]]
163
+ name = "minimal-lexical"
164
+ version = "0.2.1"
165
+ source = "registry+https://github.com/rust-lang/crates.io-index"
166
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
167
+
168
+ [[package]]
169
+ name = "miniz_oxide"
170
+ version = "0.9.1"
171
+ source = "registry+https://github.com/rust-lang/crates.io-index"
172
+ checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
173
+ dependencies = [
174
+ "adler2",
175
+ "simd-adler32",
176
+ ]
177
+
178
+ [[package]]
179
+ name = "nom"
180
+ version = "7.1.3"
181
+ source = "registry+https://github.com/rust-lang/crates.io-index"
182
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
183
+ dependencies = [
184
+ "memchr",
185
+ "minimal-lexical",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "proc-macro2"
190
+ version = "1.0.107"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
193
+ dependencies = [
194
+ "unicode-ident",
195
+ ]
196
+
197
+ [[package]]
198
+ name = "quick-xml"
199
+ version = "0.42.0"
200
+ source = "registry+https://github.com/rust-lang/crates.io-index"
201
+ checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
202
+ dependencies = [
203
+ "memchr",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "quote"
208
+ version = "1.0.47"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
211
+ dependencies = [
212
+ "proc-macro2",
213
+ ]
214
+
215
+ [[package]]
216
+ name = "rb-sys"
217
+ version = "0.9.130"
218
+ source = "registry+https://github.com/rust-lang/crates.io-index"
219
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
220
+ dependencies = [
221
+ "rb-sys-build",
222
+ ]
223
+
224
+ [[package]]
225
+ name = "rb-sys-build"
226
+ version = "0.9.130"
227
+ source = "registry+https://github.com/rust-lang/crates.io-index"
228
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
229
+ dependencies = [
230
+ "bindgen",
231
+ "lazy_static",
232
+ "proc-macro2",
233
+ "quote",
234
+ "regex",
235
+ "shell-words",
236
+ "syn",
237
+ ]
238
+
239
+ [[package]]
240
+ name = "rb-sys-env"
241
+ version = "0.2.3"
242
+ source = "registry+https://github.com/rust-lang/crates.io-index"
243
+ checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
244
+
245
+ [[package]]
246
+ name = "regex"
247
+ version = "1.13.1"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
250
+ dependencies = [
251
+ "aho-corasick",
252
+ "memchr",
253
+ "regex-automata",
254
+ "regex-syntax",
255
+ ]
256
+
257
+ [[package]]
258
+ name = "regex-automata"
259
+ version = "0.4.18"
260
+ source = "registry+https://github.com/rust-lang/crates.io-index"
261
+ checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
262
+ dependencies = [
263
+ "aho-corasick",
264
+ "memchr",
265
+ "regex-syntax",
266
+ ]
267
+
268
+ [[package]]
269
+ name = "regex-syntax"
270
+ version = "0.8.11"
271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
272
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
273
+
274
+ [[package]]
275
+ name = "roo_oxide"
276
+ version = "0.0.0"
277
+ dependencies = [
278
+ "flate2",
279
+ "magnus",
280
+ "quick-xml",
281
+ "rb-sys",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "rustc-hash"
286
+ version = "2.1.3"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
289
+
290
+ [[package]]
291
+ name = "seq-macro"
292
+ version = "0.3.6"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
295
+
296
+ [[package]]
297
+ name = "shell-words"
298
+ version = "1.1.1"
299
+ source = "registry+https://github.com/rust-lang/crates.io-index"
300
+ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
301
+
302
+ [[package]]
303
+ name = "shlex"
304
+ version = "1.3.0"
305
+ source = "registry+https://github.com/rust-lang/crates.io-index"
306
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
307
+
308
+ [[package]]
309
+ name = "simd-adler32"
310
+ version = "0.3.10"
311
+ source = "registry+https://github.com/rust-lang/crates.io-index"
312
+ checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
313
+
314
+ [[package]]
315
+ name = "syn"
316
+ version = "2.0.119"
317
+ source = "registry+https://github.com/rust-lang/crates.io-index"
318
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
319
+ dependencies = [
320
+ "proc-macro2",
321
+ "quote",
322
+ "unicode-ident",
323
+ ]
324
+
325
+ [[package]]
326
+ name = "unicode-ident"
327
+ version = "1.0.27"
328
+ source = "registry+https://github.com/rust-lang/crates.io-index"
329
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
330
+
331
+ [[package]]
332
+ name = "windows-link"
333
+ version = "0.2.1"
334
+ source = "registry+https://github.com/rust-lang/crates.io-index"
335
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
336
+
337
+ [[package]]
338
+ name = "zlib-rs"
339
+ version = "0.6.8"
340
+ source = "registry+https://github.com/rust-lang/crates.io-index"
341
+ checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
data/Cargo.toml ADDED
@@ -0,0 +1,7 @@
1
+ [workspace]
2
+ members = ["ext/roo_oxide"]
3
+ resolver = "2"
4
+
5
+ [profile.release]
6
+ codegen-units = 1
7
+ lto = "thin"
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sebastian Sala
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # roo-oxide
2
+
3
+ Native acceleration for [Roo](https://github.com/roo-rb/roo), powered by Rust.
4
+
5
+ roo-oxide is built on top of Roo and installs it as a dependency. It replaces
6
+ Roo's busiest `.xlsx` and `.xlsm` read paths with a native engine, while you
7
+ keep using `Roo::Spreadsheet`, `Roo::Excelx` and the same cell/value APIs.
8
+ On the measured large sheets, reads are **16–36× faster** with **2–31× less
9
+ memory**. Your existing Roo code stays the same.
10
+
11
+ ```ruby
12
+ # Gemfile
13
+ gem "roo-oxide"
14
+ ```
15
+
16
+ ```ruby
17
+ xlsx = Roo::Spreadsheet.open("orders.xlsx") # or Roo::Excelx.new("orders.xlsx")
18
+ xlsx.each_row_streaming { |row| ... } # read by the native reader
19
+ xlsx.parse(headers: true) # this too
20
+ ```
21
+
22
+ > **Unofficial.** roo-oxide is not affiliated with or endorsed by roo-rb or
23
+ > the roo maintainers.
24
+
25
+ ## Install
26
+
27
+ Add only `gem "roo-oxide"` to your Gemfile. Bundler installs Roo automatically
28
+ and loads the acceleration layer on `Bundler.require` (as Rails does).
29
+ Without Bundler, install `roo-oxide` and `require "roo/oxide"`; it loads Roo
30
+ for you.
31
+
32
+ ### Migrating from roo-calamine
33
+
34
+ Replace `gem "roo-calamine"` with `gem "roo-oxide"`. Roo is installed as a
35
+ dependency, so a separate `gem "roo"` line is optional.
36
+ Use `require "roo/oxide"` and `Roo::Oxide` in new code. The old
37
+ `require "roo/calamine"`, version require and `Roo::Calamine` constant remain
38
+ available as compatibility aliases in the new gem. Load one plugin gem at a
39
+ time; loading the old plugin before roo-oxide raises a migration error.
40
+
41
+ `ROO_CALAMINE` still works when `ROO_OXIDE` is unset. When both are set,
42
+ `ROO_OXIDE` takes precedence.
43
+
44
+ | | |
45
+ |---|---|
46
+ | Ruby | CRuby 3.3, 3.4, 4.0 |
47
+ | roo | `~> 4.0` |
48
+ | Precompiled | Linux x86_64/aarch64 (glibc, musl), macOS x86_64/arm64, Windows x64 |
49
+ | Other platforms | the source gem compiles with Rust 1.86 or later |
50
+ | JRuby | installs without Rust and stays inert: roo reads every file itself |
51
+
52
+ ## Benchmarks
53
+
54
+ 100,000 rows × 20 mixed columns, Apple M5 Pro, Ruby 3.4.12. Time and peak
55
+ memory include opening the workbook.
56
+
57
+ | | roo 4.0.0 | roo + roo-oxide | Faster |
58
+ |---|---:|---:|---:|
59
+ | `each_row_streaming` | 13.49 s · 119 MB | **0.59 s · 51 MB** | 23× |
60
+ | `parse(headers: true)` | 19.61 s · 3300 MB | **0.75 s · 282 MB** | 26× |
61
+ | `each` | 18.81 s · 3282 MB | **0.62 s · 174 MB** | 30× |
62
+ | 10,000 random `cell(row, col)` | 17.25 s · 3272 MB | **0.48 s · 104 MB** | 36× |
63
+ | `to_csv` | 21.72 s · 3369 MB | **0.77 s · 118 MB** | 28× |
64
+ | `to_yaml` | 24.26 s · 3430 MB | **1.28 s · 322 MB** | 19× |
65
+ | `to_xml` | 50.81 s · 3991 MB | **1.04 s · 711 MB** | 49× |
66
+ | `to_matrix` | 19.97 s · 3287 MB | **0.65 s · 216 MB** | 31× |
67
+ | [`each_row_values`](#values-only) | 13.43 s · 118 MB | **0.44 s · 47 MB** | 31× |
68
+
69
+ On the other test files it is 18–43× faster with shared strings, 16–33× with
70
+ unique strings, and 2.6–10× on a 100-row sheet. See
71
+ [bench/README.md](bench/README.md) for every file, the method, and how to run
72
+ it. [bench/RESULTS.md](bench/RESULTS.md) times every public roo read. It
73
+ ties roo only where roo reads the file itself: CSV, and XML roo-oxide
74
+ hands back.
75
+
76
+ ## Values only
77
+
78
+ If you only need values, `Roo::Oxide.each_row_values` skips roo's cell
79
+ objects. It is roo-oxide's own API, not roo's, and using it changes nothing
80
+ in what roo does.
81
+
82
+ ```ruby
83
+ Roo::Oxide.each_row_values("orders.xlsx", sheet: "Orders") do |values|
84
+ values # => [1001, "Ada", #<Date: 2024-05-01>, 19.5, nil, true]
85
+ end
86
+ ```
87
+
88
+ Each row equals, value for value, what this roo code yields:
89
+
90
+ ```ruby
91
+ Roo::Excelx.new("orders.xlsx").each_row_streaming(sheet: "Orders", pad_cells: true) do |cells|
92
+ cells.map { |cell| cell&.value }
93
+ end
94
+ ```
95
+
96
+ <details>
97
+ <summary>Arguments and value rules</summary>
98
+
99
+ - **Arguments:** a path or an IO; `sheet:` is a name or index (default: the
100
+ first sheet); other keywords are `Roo::Excelx.new` options.
101
+ - **Return:** an Enumerator without a block. It closes the workbook when it is
102
+ done.
103
+ - **Rows:** one entry per column from A to the row's last cell, with `nil`
104
+ where there is no cell.
105
+ - **Values** follow roo's rules: Integer or Float by the written text and
106
+ number format; Date, DateTime and Time by the style; roo's shared strings
107
+ (HTML for rich text); `Roo::Link` for hyperlinks; error text such as
108
+ `"#DIV/0!"`.
109
+ - With the reader off, or on JRuby, it reads through roo and yields the same
110
+ rows.
111
+
112
+ </details>
113
+
114
+ ## Turning it off
115
+
116
+ ```ruby
117
+ Roo::Oxide.enabled = false # from the next sheet read on
118
+ ```
119
+
120
+ ```sh
121
+ ROO_OXIDE=0 bundle exec rails server # also: false, off
122
+ ```
123
+
124
+ Either one makes roo read exactly as it does without the gem.
125
+ `Roo::Oxide.enabled?` tells whether the next read uses the native reader,
126
+ and `Roo::Oxide.available?` whether the extension is loaded.
127
+
128
+ ## How it works
129
+
130
+ roo-oxide prepends modules to roo's classes. A read such as
131
+ `each_row_streaming` reaches roo-oxide first, which either does the work in
132
+ a Rust extension and returns the objects roo would return, or hands the call
133
+ back to roo.
134
+
135
+ - **Opening:** worksheets stay in the zip until they are read.
136
+ - **Parsing:** worksheet XML is streamed with
137
+ [quick-xml](https://github.com/tafia/quick-xml) instead of loaded into a
138
+ Nokogiri document.
139
+ - **Lazy cells:** the sheet lives in compact native records, and a
140
+ `Roo::Excelx::Cell` is built only when something reads it.
141
+ - **Output:** `to_csv`, `to_yaml`, `to_xml`, and `to_matrix` are written from
142
+ those records.
143
+ - **Fallback:** XML the reader cannot reproduce exactly the way Nokogiri does
144
+ goes back to roo.
145
+
146
+ Styles, number formats, comments, images, and every open option stay roo's
147
+ code. roo is the test oracle: roo 4.0.0's own suite, every roo fixture, and the
148
+ edge-case suites must give the same results with and without roo-oxide.
149
+ [docs/how-it-works.md](docs/how-it-works.md) has the details and the test
150
+ coverage.
151
+
152
+ ### Known differences
153
+
154
+ These are by design.
155
+
156
+ <details>
157
+ <summary>Overrides of roo's private methods</summary>
158
+
159
+ - Under roo 4.0.0, overrides of roo's private shared-string parsing
160
+ (`SharedStrings#extract_shared_strings`, `#extract_html`,
161
+ `#fix_invalid_shared_strings`, `#create_html`) are bypassed while the reader
162
+ is on. Other roo versions build their shared strings themselves.
163
+ - Overrides of roo's private cell parsing (`SheetDoc#cell_from_xml`,
164
+ `#extract_cells`, `#extract_hyperlinks`, `#expand_merged_ranges`,
165
+ `Cell.cell_class`) are bypassed while the reader is on. So are:
166
+ - a `Roo::Excelx` subclass's `#cell` or `#each` inside `parse` and `each`
167
+ with options;
168
+ - its `#cell`, `#celltype`, `#empty?`, or roo's private `#cell_to_csv`
169
+ inside `to_csv`;
170
+ - redefinitions of the
171
+ [single-cell reads](docs/how-it-works.md#cells-and-values) in `Roo::Excelx`
172
+ or `Roo::Excelx::Sheet` themselves (subclasses work);
173
+ - under roo 4.0.0, an override of `initialize` on a `Cell` class or on
174
+ `Roo::Excelx::Coordinate`;
175
+ - under roo 4.0.0, `Sheet#pad_cells` redefined in `Roo::Excelx::Sheet`
176
+ itself (subclasses and prepended overrides work).
177
+
178
+ </details>
179
+
180
+ <details>
181
+ <summary>Behavior and performance</summary>
182
+
183
+ - **Building `Sheet#cells` late costs more.** Building the whole hash (`#set`,
184
+ for example) after a read that does not need it (a single-cell read,
185
+ `#last_row`, `#row`, `#each`, `#parse`) costs more than building it from the
186
+ start, because the sheet is parsed before any cell is built rather than
187
+ alongside.
188
+ - **Non-UTF-8 text set by hand.** A cell value set to non-ASCII text in an
189
+ encoding other than UTF-8 can make `to_csv` raise
190
+ `Encoding::CompatibilityError`, where roo writes it, when its line also
191
+ holds non-ASCII UTF-8 text. Cells read from a file are always UTF-8.
192
+ - **Writes straight into `cells`.** On a
193
+ [sheet built whole](docs/how-it-works.md#cells-and-values), inside an `each`
194
+ block without options, a write straight into `sheet_for(...).cells` (not
195
+ through `set`) does not show in later rows.
196
+ - **Broken XML.** On XML that breaks partway, `each_row_streaming` raises the
197
+ same `Nokogiri::XML::SyntaxError` as roo but yields a few more rows before
198
+ it.
199
+ - **Errors come when a sheet is read.** A workbook leaves its worksheets in
200
+ the zip, so a worksheet whose compressed data is broken, or larger than the
201
+ zip says, raises roo's error when it is read rather than in
202
+ `Roo::Excelx.new`. The paths in `#sheet_files` exist only once roo's own
203
+ code has read them.
204
+
205
+ </details>
206
+
207
+ ## Development
208
+
209
+ ```sh
210
+ bundle install
211
+ bundle exec rake compile # build the extension
212
+ bundle exec rake test # unit, fixture, and edge-case tests
213
+ bundle exec rake parity # roo 4.0.0's own suites, with and without roo-oxide
214
+ bundle exec rubocop
215
+ cargo test && cargo clippy --all-targets -- -D warnings && cargo fmt --check
216
+ ```
217
+
218
+ ## License
219
+
220
+ MIT. See [LICENSE](LICENSE).