0

I'm trying to parse a binary data packet in python with Construct module and have successfully parsed the header part (like data length) but according to packet spec part of the data inside the packet is encoded using continuous bit stream and last byte padded to align to byte boundary. How should I describe it in Struct constructor? I tried Field and Bytes but no success.

ceridwen
  • 550
  • 2
  • 5
  • 14
Tamm
  • 262
  • 6
  • 15
  • 1
    Did you check [Tutorial #2](http://construct.wikispaces.com/tut-bitwise)? – Janne Karila Sep 03 '12 at 17:35
  • [Tutorial #2](http://construct.wikispaces.com/tut-bitwise) helped and seems like BitStruct is the way to go. Thank you @JanneKarila – Tamm Sep 05 '12 at 15:16

0 Answers0