# Reading binary data from a file

**URL:** <https://discourse.julialang.org/t/reading-binary-data-from-a-file/108695>\
**Category:** General Usage\
**Tags:** question, binaryio\
**Created:** [January 11, 2024, 5:16pm UTC](https://discourse.julialang.org/t/reading-binary-data-from-a-file/108695 "2024-01-11T17:16:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 11, 2024, 5:24pm UTC](https://discourse.julialang.org/t/reading-binary-data-from-a-file/108695/2 "2024-01-11T17:24:31Z")

</div>

See, for example:

- [How to read binary file in Julia? - Stack Overflow](https://stackoverflow.com/questions/59991708/how-to-read-binary-file-in-julia)
- [How do I read a binary file back into an Array?](https://discourse.julialang.org/t/how-do-i-read-a-binary-file-back-into-an-array/28454)
- [Read binary data of arbitrary dims and type](https://discourse.julialang.org/t/read-binary-data-of-arbitrary-dims-and-type/28560)

All of these appeared in the first page of Google results for “read binary file Julia”, and they all point to the same function: [`read!`](https://docs.julialang.org/en/v1/base/io-network/#Base.read!).

(Of course, this assumes that your “binary data” just consists of raw arrays written directly to a file, as opposed to a more structured binary format like HDF5.jl.)

---

_[View the full topic](https://discourse.julialang.org/t/reading-binary-data-from-a-file/108695)._
