# Can reinterpret be told what endian the data is?

**URL:** <https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120>\
**Category:** New to Julia\
**Created:** [May 14, 2021, 4:58am UTC](https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120 "2021-05-14T04:58:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ligert123](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ligert123/32/24682_2.png) [@ligert123](https://discourse.julialang.org/u/ligert123)\
**Post date:** [May 14, 2021, 4:58am UTC](https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120/1 "2021-05-14T04:58:46Z")

</div>

Hello, i was curious if there is anyway to use reinterpret on a UInt8 vector but flip the endianness of the interpretation?  
If it cant be done using the reinterpret function directly would anyone know how to flip the values after?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [May 14, 2021, 5:07am UTC](https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120/2 "2021-05-14T05:07:12Z")

</div>

Julia has a variety of functions for this [I/O and Network · The Julia Language](https://docs.julialang.org/en/v1/base/io-network/#Base.ntoh). `ntoh`, `hton`, `ltoh`, and `htol` depending on what you want.
