Hi everyone (this is copied from the scodec mailing-list),
One simple example is something like that :
println(Codec.decode(hex"9321".bits)(uint4 ~~ uint4 ~~ uint4 ~~ uint4))
with the result being :
Successful(DecodeResult((9,3,2,1),BitVector(empty)))
I would like to be able to create a Codec or helper function where I can only specify the number of 4-bits, I want to parse and get the associated Long.
Like that :
> println(Codec.decode(hex"9321".bits)(packedDecimalCodec(4)))
Successful(DecodeResult((9321),BitVector(empty)))
I'm kind of stuck here, and I'd really appreciate your help.
Regards,
Olivier.