Commit Graph

30 Commits (master)

Author SHA1 Message Date
Bradlee Speice c108db095d Actually validate the test 2019-05-09 14:03:01 -04:00
Bradlee Speice 37ea0f5cc1 Split into `read` and `stream` lifetimes
Much easier to read, and compiles all the examples we need.
2019-05-09 13:58:27 -04:00
Bradlee Speice d41f578c83 Add some methods for helping with iterators 2019-05-08 14:04:30 -04:00
Bradlee Speice 1c15eb14d6 Error variant for mis-calculated instance values 2019-05-08 12:35:36 -04:00
Bradlee Speice 5d956efcde Implement most of the boring methods 2019-05-06 16:56:55 -04:00
Bradlee Speice 2b6e62dca1 Clean up the API for reading bits 2019-05-06 16:22:00 -04:00
Bradlee Speice 7eb92c77fb Change termination byte to u8
It functions like `char`, but Kaitai treats as int under the hood
2019-05-06 15:46:43 -04:00
Bradlee Speice 2b9fe2f3fe Change enum type to i64 2019-05-06 12:24:42 -04:00
Bradlee Speice 94ae155a5b Add implementation for `align_to_byte` 2019-05-06 12:24:03 -04:00
Bradlee Speice 06dab779c9 Add implementation for read_bits_int 2019-04-30 16:10:48 -04:00
Bradlee Speice 21bc218096 Extra enum variants 2019-04-29 15:48:14 -04:00
Bradlee Speice 9c3294ebcb Rustfmt 2019-04-29 14:06:41 -04:00
Bradlee Speice 7a8cf71285 Add a TODO 2019-04-29 14:06:16 -04:00
Bradlee Speice 4b6e5181b2 Add `Default` as a required trait
I could make KStruct require `fn new`, but what I really want already exists.
2019-04-29 14:05:03 -04:00
Bradlee Speice 01d42890f6 Now have a structure that actually works 2019-04-26 16:08:55 -04:00
Bradlee Speice 0835e4bc26 Still working with the borrow checker 2019-04-24 17:13:34 -04:00
Bradlee Speice 442b5c4006 Explicit lifetime for `self`
Because we give a reference to ourselves out to children as `_parent`,
we can't use an anonymous lifetime
2019-04-23 17:46:21 -04:00
Bradlee Speice 1cec9a0fe6 Basic PoC for `read_bytes`
Mostly just needed to reassure myself that the lifetimes work.
2019-04-23 15:34:00 -04:00
Bradlee Speice cf92d98671 Fix compiler warnings 2019-04-23 13:29:31 -04:00
Bradlee Speice 5343ac0396 Make sure the unit struct actually compiles 2019-04-23 13:25:38 -04:00
Bradlee Speice 10b7219633 Add a unit type for KStruct 2019-04-23 13:17:42 -04:00
Bradlee Speice a079b75c6e Remove bad docs, make parent a KStruct 2019-04-23 13:02:31 -04:00
Bradlee Speice 9723f0b12d Read everything as byte slices
Zero-copy baby.
2019-04-22 17:57:00 -04:00
Bradlee Speice d8f783e85d Use names more similar to C++ runtime 2019-04-22 15:46:18 -04:00
Bradlee Speice f9ae7b76cb Add an UnknownEnum error type, make KaitaiStruct optional for parents 2019-04-22 12:01:01 -04:00
Bradlee Speice 7d297b884a Rustfmt 2019-04-18 11:31:33 -04:00
Bradlee Speice 5c5d84a57b Final cleanup?
Need to spec out the process and zlib methods, but otherwise looks decent
2019-04-16 18:32:29 -04:00
Bradlee Speice 79f9039c7e Not quite compiling, but getting better 2019-04-16 17:40:22 -04:00
Bradlee Speice af5bd80034 Minor cleanup 2019-04-16 14:55:24 -04:00
Bradlee Speice bfeb073143 Initial draft for the Kaitai API 2019-04-16 14:53:53 -04:00