parameters: (self, data)
docstring: Initialize an instance from data, following the data structure
          described in self.STRUCT. The self.MAGIC signature is expected at
          data[:4].
docstring_summary: Initialize an instance from data, following the data structure
          described in self.STRUCT. The self.MAGIC signature is expected at
          data[:4].
docstring_tokens: Initialize an instance from data following the data structure described in self . STRUCT . The self . MAGIC signature is expected at data [ : 4 ] .
function: def _init_data(self, data):
          '''
          Initialize an instance from data, following the data structure
          described in self.STRUCT. The self.MAGIC signature is expected at
          data[:4].
          '''
          assert data is not None
          self.signature, size = JarStruct.get_data('uint32', data)
          if self.signature != self.MAGIC:
              raise JarReaderError('Bad magic')
          offset = size
          # For all fields used as other fields sizes, keep track of their value
          # separately.
          sizes = dict((t, 0) for t in self.size_fields)
          for name, t in self.STRUCT.iteritems():
              if t in JarStruct.TYPE_MAPPING:
                  value, size = JarStruct.get_data(t, data[offset:])
              else:
                  size = sizes[t]
                  value = data[offset:offset + size]
                  if isinstance(value, memoryview):
                      value = value.tobytes()
              if not name in sizes:
                  self._values[name] = value
              else:
                  sizes[name] = value
              offset += size
function_tokens: def _init_data ( self , data ) : assert data is not None self . signature , size = JarStruct . get_data ( 'uint32' , data ) if self . signature != self . MAGIC : raise JarReaderError ( 'Bad magic' ) offset = size # For all fields used as other fields sizes, keep track of their value # separately. sizes = dict ( ( t , 0 ) for t in self . size_fields ) for name , t in self . STRUCT . iteritems ( ) : if t in JarStruct . TYPE_MAPPING : value , size = JarStruct . get_data ( t , data [ offset : ] ) else : size = sizes [ t ] value = data [ offset : offset + size ] if isinstance ( value , memoryview ) : value = value . tobytes ( ) if not name in sizes : self . _values [ name ] = value else : sizes [ name ] = value offset += size