On Tue, Sep 12, 2017 at 2:55 AM, Casimiro de Almeida Barreto < casimiro.barr...@gmail.com> wrote:
> Is there a (easy and ready) way to convert hexa to binary. I mean, convert > data that was transformed > > x := myData asByteArray hex. > > back to binary? > > > I thought I'd try what usually works... World > Tools > Finder > Examples First to test what we know... #(9 10 11 12) asByteArray . '090a0b0c' results in #hex but the reverse... '090a0b0c' . #(9 10 11 12) asByteArray . doesn't show any result, so perhaps there is no easy way. But this might give you a starting point... hexString := #(9 10 11 12) asByteArray hex. (NumberParser on: '16r', hexString) nextInteger asByteArray " ==> #[9 10 11 12]" cheers -ben