The scodec discriminated.by(tag).typecase(n,message) does not suffice to match all message structures:
- tag is at start of structure
- value of tag is not required by the message codec.
The PeekCodec uses the target codec to extract a value, but returns the original BitVector so the tag value can be re-decoded by a subsequent codec.