<length field 1 in bits (1 byte)> <field 1> <length field 2 in bits (1 byte)> <field 2> <length field 3 in bits (1 byte)> <field 3>
I am hoping that there is some clever way to do this with unpack but I don't know how to get the field length while also unpacking without iteratively calling pack.