Handle Hexa Data as input to the network

Hi , I’m reading an Hexa file, and I want to feed my network with that data, as far as I know, won’t be able to handle Byte type, So I need to find a way to make it int type.
Let’s say my data is :“f1 2e”, wanted output :“15 1 2 14”.
each nibble converted to Int.
Now I can do it straight forward and move nibble by nibble and convert to int, the problem that it is to slow, the files are big, around 450k nibbles.

Do you have any Idea? a way of keeping it as hexa? or a better way converting? any any dvice will be great.
And I don’t want to do this conversion as preprocessing but “live” when loading.

Thanks!