code: def unpack_struct(self, struct):
          
  
          size = struct.size
  
          if not self.data:
              raise UnpackException(struct.format, size, 0)
  
          buff = self.data.read(size)
          if len(buff) < size:
              raise UnpackException(struct.format, size, len(buff))
  
          return struct.unpack(buff)
docs: unpacks the given struct from the underlying stream and returns
          the results. Will raise an UnpackException if there is not
          enough data to satisfy the format of the structure