Commit 7bdb16b
committed
feat: v5 Writer implementation + Parser bug fixes (TASK-011)
Complete MATLAB v5 format writer with all parser fixes.
v5 Writer Features:
- All numeric types: double, single, int8-64, uint8-64
- Complex numbers (real + imaginary parts)
- Multi-dimensional arrays (1D, 2D, 3D, N-D)
- Both endianness: MI (little-endian) and IM (big-endian)
- Proper 8-byte alignment and padding
- Public API: Create(filename, Version5)
v5 Parser Fixes:
- Critical bug: Fixed tag format detection in data_tag.go
- Multi-dimensional arrays now work correctly
- Multiple variables in one file now supported
- All round-trip tests passing (100%)
Quality Metrics:
- Linter: 0 errors, 0 warnings ✅
- Tests: All passing (100%), including previously skipped
- Coverage: 78.5% (main), 51.8% (v5), 48.8% (v73)
- Round-trip verified: v5 write → read → verify
- Code formatting: gofmt applied to all files
Code Changes:
- internal/v5/writer.go (565 lines) - Core implementation
- internal/v5/writer_test.go (589 lines) - Unit tests
- v5_roundtrip_test.go (430 lines) - Round-trip tests
- internal/v5/data_tag.go - Parser fix (~30 lines)
- matfile_write.go - v5 integration
- README.md - v5 Writer examples
- CHANGELOG.md - v0.2.0 section
Production-ready: v5 Writer + Reader fully functional
Pre-release check: ✅ PASSED (all checks green)1 parent b73b1e6 commit 7bdb16b
File tree
9 files changed
+1766
-52
lines changed- internal/v5
9 files changed
+1766
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
10 | 45 | | |
11 | 46 | | |
12 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
137 | 198 | | |
138 | 199 | | |
139 | 200 | | |
| |||
151 | 212 | | |
152 | 213 | | |
153 | 214 | | |
154 | | - | |
| 215 | + | |
155 | 216 | | |
156 | 217 | | |
157 | 218 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
162 | 224 | | |
163 | 225 | | |
164 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
37 | 28 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
45 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
46 | 45 | | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
0 commit comments