Kitlith
Kitlith
I think this could be a useful layout for file types that you are in the middle of writing a pattern for/in the middle of reverse engineering, when you are...
I noticed Linked Lists are listed, I think this does the subject the most justice: https://rust-unofficial.github.io/too-many-lists/
alternatively/additionally, what is the current point of after_parse atm? because rn i don't see anything it does that can't otherwise be done with read_options. If we had a way to...
given that count is handled as an attribute? yeah, this probably belongs as an attribute too. The location of the condition makes sense. Until the attribute has been written...: I...
I really need to get the code i wrote up at some point. >_> @jam1garner I largely agree with you. your solution sounds good, but you could also just have...
I think this is a version that's closer to jam's proposed solution, just without the macro syntax magic @Waelwindows ```rust pub struct CurPos(pub u64); impl BinRead for CurPos { type...
true enough, but at least you only have to subtract the size of the magic, and if you had a file format where offsets are relative to some other part...
There are workarounds you can pull by making use of the seek_before attribute to read the offset field twice, though it's extremely janky. Something that might be slightly more elegant...
Example code for the last workaround: ([playground](https://www.rustexplorer.com/b/zc0dt1)) ```rust #[derive(Debug, BinRead, Clone, Copy)] struct Dummy; impl IntoSeekFrom for Dummy { fn into_seek_from(self) -> SeekFrom { SeekFrom::Start(0) } } type Placement =...
The thing that jumps out at me, is that you're using `#[br(args(...))]`: this means you're using positional (tuple) arguments instead of named arguments (struct), which is what vecs use. I'd...