News for hackers. Stuff that matters.
Re:Kaitai Struct: A new way to develop parsers for binary st... by Kuinox on Thursday March 17, 2022 @07:34PM (#30717041)
Tried it a while back but: The yaml based description is really annoying.

It doesn't supported bit per bit reading which I needed, so I had to stop when I realised that.

Re:Kaitai Struct: A new way to develop parsers for binary st... by alophawen on Thursday March 17, 2022 @10:01PM (#30717979)
I am interested in your use case as I worked on a similar tool, handling a number of file formats.

Do you mean mapping meaning from bit fields?

Re:Kaitai Struct: A new way to develop parsers for binary st... by dhx on Friday March 18, 2022 @04:41AM (#30719878)
Kuinox could be referring to bit field types that are packed in a way that doesn't correspond to 8-bit alignments. See [1] and [2].

Kaitai Struct does support bit fields but they have to be aligned on 8 bit boundaries[3]. I can't think of any instance of a binary format anyone would still be using that would fail this condition to align on 8 bit boundaries.

[1] http://www.catb.org/esr/structure-packing/#_bitfields

[2] https://retrocomputing.stackexchange.com/questions/15512/did...

[3] https://doc.kaitai.io/user_guide.html#_bit_sized_integers

Re:Kaitai Struct: A new way to develop parsers for binary st... by Kuinox on Saturday March 19, 2022 @01:59PM (#30735993)
I used it when I was trying to reverse engineer fortnite replays files. https://fortnitereplaydecompressor.readthedocs.io/en/latest/...

Unreal engine encode the network packet like it's a BitStream, when it want to write a boolean for example, it will write a single bit. The following integer won't be aligned.

Re:Kaitai Struct: A new way to develop parsers for binary st... by alophawen on Thursday March 31, 2022 @07:46PM (#30873569)
Do you mean the Oodle compression mentioned in the link? Because I don't see any such unaligned bitstream unpacking mentioned in the link or in https://fortnitereplaydecompressor.readthedocs.io/en/latest/...