# Does Julia have an analog of Python's readinto method?

**URL:** <https://discourse.julialang.org/t/does-julia-have-an-analog-of-pythons-readinto-method/6123>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 27, 2017, 8:56pm UTC](https://discourse.julialang.org/t/does-julia-have-an-analog-of-pythons-readinto-method/6123 "2017-09-27T20:56:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Belopolsky](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander_belopolsky/32/4882_2.png) [@Alexander\_Belopolsky](https://discourse.julialang.org/u/Alexander_Belopolsky)\
**Post date:** [September 27, 2017, 8:56pm UTC](https://discourse.julialang.org/t/does-julia-have-an-analog-of-pythons-readinto-method/6123/1 "2017-09-27T20:56:03Z")

</div>

Is there a way to read data from a binary stream directly into a pre-existing vector without making a copy? In Python, I can use [the readinto method](https://docs.python.org/3.6/library/io.html?highlight=readinto#io.RawIOBase.readinto). Does Julia have anything similar?

---

<div class="post-metadata">

**Author:** ![Evizero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evizero/32/10118_2.png) [@Evizero](https://discourse.julialang.org/u/Evizero)\
**Post date:** [September 27, 2017, 8:58pm UTC](https://discourse.julialang.org/t/does-julia-have-an-analog-of-pythons-readinto-method/6123/2 "2017-09-27T20:58:18Z")

</div>

`read!`, `readbytes!`
