That depends on where the data is coming from and how it is to be encoded.
For the example you have, I would suggest the following expression:

0x010205ff

Which encodes the specified data a UInt32, independent of platform
endianness.

On Fri, Mar 27, 2015 at 9:04 PM J Luis [email protected]
<http://mailto:[email protected]> wrote:

Hi,
>
> How can I encode  4 one byte variable, lets say
>
> julia> UInt8[1 2 5 255]
> 1x4 Array{UInt8,2}:
>  0x01  0x02  0x05  0xff
>
> into a single variable with 4 bytes length?
>
> Thanks.
>
​

Reply via email to