title: How to read N bytes using BytesIO?
body: <p>How can I read byte stream of length 'N' into BytesIO?
  Here is my code:</p>
  <pre><code>    result = self.py_api.get_output() # this return bytes of length N = 300
      # sample result is like \ufffdNUMPY\x01\x00v\x00{'descr': '&lt;f4', 'fortran_order'....
      load_bytes = BytesIO(result)
      arr =  np.load(load_bytes, allow_pickle=True) #read as a numpy array
  </code></pre>
  <p>as there is null in the bytes, it will read till that and we see load_bytes as <code>\ufffdNUMPY\x01</code>.
  As I know the length of the bytes, is there a way to read whole content?</p>