Packed struct


I have some binary data which I would like to unpack to some struct. However, as far as I know julia does not support the packed (ie non aligned without padding) struct and that make it impossible to use unsafe_wrap to decode those data without copying the data. I tried many options and looks like the closest thing is the cbinding packege, which allow packed c struct but still wont allow direct dereferencing without copying.

May I ask if anyone has the same problem and how difficult to allow julia normal composite to support this packed struct?


1 Like

you may also be interested in this package:


Tried that and the dereferencing does not work.

I guess it has to be solved fundamentally so that the generic struct support the packed structure