Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Is there a oneliner that converts a binary file from little endian to big endian?

and vice versa.

I am running a RedHat if relevant.
by

1 Answer

vishaljlf39
You cannot do this because for such a conversion, you need to know the meaning of the binary content.

If e.g. there is a string inside a binary file it must not be converted and a 4 byte integer may need different treatment than a two byte integer.

In other words, for a byte order conversion, you need a data type description.

Login / Signup to Answer the Question.