Erlang doesn't let me do:
Type = bitstring.
<<FirstPart:8/Type, Rest/bitstring>> = some_binary.
although it lets me do:
Size = 8.
<<FirstPart:Size/bitstring, Rest/bitstring>> = some_binary.
So, in bit string expressions, while I can pass the size through a variable, It doesnt let me pass the type through a variable. Is there any solution?