def read_chunk(self, t):
size = self.data[self.pos : self.pos + <NUM_LIT:4>].cast("<STR_LIT:i>")[<NUM_LIT:0>]<EOL>d = self.data[self.pos + <NUM_LIT:4> : self.pos + <NUM_LIT:4> + size]<EOL>assert (<EOL>self.data[self.pos + <NUM_LIT:4> + size : self.pos + <NUM_LIT:4> + size + <NUM_LIT:4>].cast("<STR_LIT:i>")[<NUM_LIT:0>]<EOL>== size<EOL>)<EOL>self.pos = self.pos + <NUM_LIT:4> + size + <NUM_LIT:4><EOL>res = np.array(d.cast(t))<EOL>if res.size == <NUM_LIT:1>:<EOL><INDENT>return res[<NUM_LIT:0>]<EOL><DEDENT>return res<EOL>
Read out the next chunk of memory

Values in fortran binary streams begin and end with the number of bytes
:param t: Data type (same format as used by struct).
:return: Numpy array if the variable is an array, otherwise a scalar.