@k67/kaitai-struct-ts 0.9.0 โ 0.11.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 -44
- package/dist/browser/index.mjs +272 -0
- package/dist/browser/index.mjs.map +1 -0
- package/dist/cli.js +630 -53
- package/dist/index.d.mts +46 -6
- package/dist/index.d.ts +46 -6
- package/dist/index.js +591 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +591 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Parse any binary data format by providing a `.ksy` (Kaitai Struct YAML) definiti
|
|
|
25
25
|
- ๐ฆ **Zero dependencies** (runtime) - Only YAML parser for development
|
|
26
26
|
- ๐ฏ **TypeScript native** - Full type safety and IntelliSense support
|
|
27
27
|
- ๐ **Universal** - Works in Node.js and browsers
|
|
28
|
-
- ๐งช **Well tested** -
|
|
28
|
+
- ๐งช **Well tested** - 283 comprehensive tests
|
|
29
29
|
- ๐ **Well documented** - Clear API and examples
|
|
30
30
|
|
|
31
31
|
### Advanced Features
|
|
@@ -36,6 +36,7 @@ Parse any binary data format by providing a `.ksy` (Kaitai Struct YAML) definiti
|
|
|
36
36
|
- ๐จ **Enums** - Named constants with expression access
|
|
37
37
|
- ๐ **Conditional parsing** - if, repeat-expr, repeat-until
|
|
38
38
|
- ๐ **Positioned reads** - Absolute positioning with pos attribute
|
|
39
|
+
- ๐ **Streaming API** - Parse large files progressively (v0.10.0)
|
|
39
40
|
|
|
40
41
|
## Installation
|
|
41
42
|
|
|
@@ -108,28 +109,37 @@ console.log(result.name)
|
|
|
108
109
|
|
|
109
110
|
## Current Status
|
|
110
111
|
|
|
111
|
-
**Version:** 0.
|
|
112
|
+
**Version:** 0.10.0
|
|
112
113
|
**Status:** Production Ready ๐
|
|
113
|
-
**
|
|
114
|
+
**Latest:** Streaming API for large files
|
|
114
115
|
|
|
115
116
|
### โ
Fully Implemented
|
|
116
117
|
|
|
117
118
|
- **Core Runtime** - Complete binary stream reader with all primitive types
|
|
119
|
+
- **Streaming API** - Parse files larger than RAM with progressive results (NEW in v0.10.0)
|
|
118
120
|
- **KSY Parser** - Full YAML parser with schema validation
|
|
119
121
|
- **Type Interpreter** - Execute schemas against binary data
|
|
120
122
|
- **Expression Evaluator** - Complete Kaitai expression language support
|
|
121
123
|
- **Advanced Features** - Conditionals, enums, repetitions, instances, switch/case
|
|
122
124
|
- **CLI Tool** - Command-line utility for parsing binary files
|
|
123
|
-
- **Testing** -
|
|
125
|
+
- **Testing** - 283 comprehensive tests, all passing
|
|
124
126
|
- **Documentation** - Complete user and developer documentation
|
|
125
127
|
|
|
128
|
+
### ๐ What's New in v0.10.0
|
|
129
|
+
|
|
130
|
+
- **Streaming API** - Parse large files without loading everything into memory
|
|
131
|
+
- `StreamingKaitaiStream` - Forward-only stream reader
|
|
132
|
+
- `parseStreaming()` - Event-based progressive parsing
|
|
133
|
+
- Memory-efficient for files larger than RAM
|
|
134
|
+
- See [docs/STREAMING.md](./docs/STREAMING.md)
|
|
135
|
+
|
|
126
136
|
### ๐ Remaining for v1.0.0
|
|
127
137
|
|
|
128
|
-
-
|
|
138
|
+
- Processing implementations (zlib, encryption)
|
|
129
139
|
- Type imports across files
|
|
130
140
|
- Additional performance optimizations
|
|
131
141
|
|
|
132
|
-
See [docs/
|
|
142
|
+
See [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) for architecture details.
|
|
133
143
|
|
|
134
144
|
## API Documentation
|
|
135
145
|
|
|
@@ -163,7 +173,7 @@ const stream = new KaitaiStream(buffer)
|
|
|
163
173
|
const value = stream.readU4le() // Read 4-byte unsigned little-endian integer
|
|
164
174
|
```
|
|
165
175
|
|
|
166
|
-
See [API Documentation](./docs/
|
|
176
|
+
See [API Documentation](./docs/API.md) for complete reference.
|
|
167
177
|
|
|
168
178
|
## CLI Reference
|
|
169
179
|
|
|
@@ -226,47 +236,21 @@ pnpm format
|
|
|
226
236
|
|
|
227
237
|
## Roadmap
|
|
228
238
|
|
|
229
|
-
### โ
|
|
230
|
-
|
|
231
|
-
- โ
Binary stream reader (KaitaiStream)
|
|
232
|
-
- โ
All primitive types (u1-u8, s1-s8, f4, f8)
|
|
233
|
-
- โ
String encoding (UTF-8, ASCII, Latin-1, UTF-16)
|
|
234
|
-
- โ
Byte arrays and positioning
|
|
235
|
-
- โ
Error handling system
|
|
236
|
-
|
|
237
|
-
### โ
Phase 2: Core Features (v0.2.0-v0.4.0) - Complete
|
|
238
|
-
|
|
239
|
-
- โ
KSY parser with validation
|
|
240
|
-
- โ
Type interpreter
|
|
241
|
-
- โ
Expression evaluator (full Kaitai expression language)
|
|
242
|
-
- โ
Conditionals (if attribute)
|
|
243
|
-
- โ
Enums with expression access
|
|
244
|
-
- โ
Repetitions (repeat-expr, repeat-until, repeat-eos)
|
|
245
|
-
- โ
Nested user-defined types
|
|
239
|
+
### โ
Completed
|
|
246
240
|
|
|
247
|
-
|
|
241
|
+
- **v0.1.0-v0.4.0** - Core runtime, KSY parser, type interpreter, expressions
|
|
242
|
+
- **v0.5.0-v0.6.0** - Advanced features (switch/case, instances, parametric types)
|
|
243
|
+
- **v0.7.0-v0.9.0** - CLI tool, production polish, expression-based endianness
|
|
244
|
+
- **v0.10.0** - Streaming API for large files
|
|
248
245
|
|
|
249
|
-
|
|
250
|
-
- โ
Instances (lazy-evaluated fields with caching)
|
|
251
|
-
- โ
Parametric types
|
|
252
|
-
- โ
Positioned reads (pos attribute)
|
|
253
|
-
- โ
Sized substreams
|
|
254
|
-
- โ
Processing framework (ready for zlib/encryption)
|
|
246
|
+
### ๐ In Progress (v1.0.0)
|
|
255
247
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
260
|
-
- โ
Production-ready release
|
|
261
|
-
|
|
262
|
-
### ๐ Phase 5: v1.0.0 - Final Polish (In Progress)
|
|
263
|
-
|
|
264
|
-
- โณ Processing implementations (zlib, encryption)
|
|
265
|
-
- โณ Type imports across files
|
|
266
|
-
- โณ Additional performance optimizations
|
|
267
|
-
- โณ Extended format testing
|
|
248
|
+
- Processing implementations (zlib, encryption)
|
|
249
|
+
- Type imports across files
|
|
250
|
+
- Additional performance optimizations
|
|
251
|
+
- Extended format testing
|
|
268
252
|
|
|
269
|
-
**Current Status:** Production-ready,
|
|
253
|
+
**Current Status:** Production-ready, actively maintained
|
|
270
254
|
|
|
271
255
|
## Contributing
|
|
272
256
|
|