Deserialize full object.

        Args:
            buffer (bytes, bytearray, BytesIO): (Optional) data to create the stream from.

        Returns:
            AccountState:
769824
def DeserializeFromDB(buffer):
        
        m = StreamManager.GetStream(buffer)
        reader = BinaryReader(m)
        account = AccountState()
        account.Deserialize(reader)

        StreamManager.ReleaseStream(m)

        return account
605428
private ByteBuffer buffer( InputStream stream ) throws IOException {
        stream.reset();
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        IoUtil.write(stream, bout);
        return ByteBuffer.wrap(bout.toByteArray());
    }
1314988
def from_buffer(buffer, mime=False):
    
    m = _get_magic_type(mime)
    return m.from_buffer(buffer)
1320882
def get_data_from_buffer(self, filter_func=None, converter_func=None):
        '''
        '''
        if self._is_running:
            raise RuntimeError('Readout thread running')
        if not self.fill_buffer:
            logging.warning('Data buffer is not activated')
        return [convert_data_iterable(data_iterable, filter_func=filter_func, converter_func=converter_func) for data_iterable in self._data_buffer]
684149
def parse_buffer(stream, separator=None):
    
    rows = []
    lines = []
    for line, row in parse_lines(stream, separator):
        lines.append(line)
        rows.append(row)
    cols = zip(*rows)
    return {
        'rows': rows,
        'lines': lines,
        'cols': cols,
        }
988184
@SuppressWarnings("unchecked")
  private <T> T readByClass(BufferInput<?> buffer) {
    String name = buffer.readUTF8();
    if (whitelistRequired.get())
      throw new SerializationException("cannot deserialize unregistered type: " + name);

    Class<T> type = (Class<T>) types.get(name);
    if (type == null) {
      try {
        type = (Class<T>) Class.forName(name);
        if (type == null)
          throw new SerializationException("cannot deserialize: unknown type");
        types.put(name, type);
      } catch (ClassNotFoundException e) {
        throw new SerializationException("object class not found: " + name, e);
      }
    }

    TypeSerializer<T> serializer = getSerializer(type);
    if (serializer == null)
      throw new SerializationException("cannot deserialize unregistered type: " + name);

    return serializer.read(type, buffer, this);
  }
1206888
function __deserializeContent(buffer, start, options) {
	let type, data;
	({ anchor: start, value: type } = __deserializeType(buffer, start, options));
	({ anchor: start, value: data } = __deserializeData(type, buffer, start, options));
	return { anchor: start, value: data };
}
141861
def Deserializer(stream_or_string, **options):
    
    if isinstance(stream_or_string, (bytes, six.string_types)):
        stream_or_string = BytesIO(stream_or_string)
    try:
        def line_generator():
            for line in stream_or_string:
                yield json.loads(line.strip())
        for obj in PythonDeserializer(line_generator(), **options):
            yield obj
    except GeneratorExit:
        raise
    except Exception as e:
        # Map to deserializer error
        six.reraise(DeserializationError, DeserializationError(e), sys.exc_info()[2])
180913
def deserialize(self, response, response_type):
        
        # handle file downloading
        # save response body into a tmp file and return the instance
        if "file" == response_type:
            return self.__deserialize_file(response)

        # fetch data from response object
        try:
            data = json.loads(response.data)
        except ValueError:
            data = response.data

        return self.__deserialize(data, response_type)
1361362
def deserialize(cls, v, bind_client=None):
        
        if v is None:
            return None
        o = cls(bind_client=bind_client)
        o.from_dict(v)
        return o
535176
private Object deserialize(InputStream byteStream) throws IOException, ClassNotFoundException {
        ObjectInputStream in = new ObjectInputStream(byteStream);
        try {
            return in.readObject();
        } finally {
            in.close();
        }
    }
732881
def from_buffer(self, buf):
        
        with self.lock:
            try:
                # if we're on python3, convert buf to bytes
                # otherwise this string is passed as wchar*
                # which is not what libmagic expects
                if isinstance(buf, str) and str != bytes:
                    buf = buf.encode('utf-8', errors='replace')
                return maybe_decode(magic_buffer(self.cookie, buf))
            except MagicException as e:
                return self._handle509Bug(e)
1117795
def Deserialize(self, reader):
        
        super(SpentCoinState, self).Deserialize(reader)

        self.TransactionHash = reader.ReadUInt256()
        self.TransactionHeight = reader.ReadUInt32()

        count = reader.ReadVarInt()

        items = [0] * count
        for i in range(0, count):
            index = reader.ReadUInt16()
            height = reader.ReadUInt32()
            items[i] = SpentCoinItem(index=index, height=height)

        self.Items = items
855395
def deserialize_account(account_json)
      FioAPI::Account.new(
        account_id:       account_json.try_path('accountId'),
        bank_id:          account_json.try_path('bankId'),
        currency:         account_json.try_path('currency'),
        iban:             account_json.try_path('iban'),
        bic:              account_json.try_path('bic'),
        opening_balance:  account_json.try_path('openingBalance'),
        closing_balance:  account_json.try_path('closingBalance'),
        date_start:       account_json.try_path('dateStart'),
        date_end:         account_json.try_path('dateEnd'),
        year_list:        account_json.try_path('yearList'),
        id_list:          account_json.try_path('idList'),
        id_from:          account_json.try_path('idFrom'),
        id_to:            account_json.try_path('idTo'),
        id_last_download: account_json.try_path('idLastDownload')
      )
    end
834277
def deserialize_from_http_generics(cls, body_bytes, headers):
        # type: (Optional[Union[AnyStr, IO]], Mapping) -> Any
        
        # Try to use content-type from headers if available
        content_type = None
        if 'content-type' in headers:
            content_type = headers['content-type'].split(";")[0].strip().lower()
        # Ouch, this server did not declare what it sent...
        # Let's guess it's JSON...
        # Also, since Autorest was considering that an empty body was a valid JSON,
        # need that test as well....
        else:
            content_type = "application/json"

        if body_bytes:
            return cls.deserialize_from_text(body_bytes, content_type)
        return None
1126937
public static byte[] readBytes(ByteBuffer buffer) {
		final int remaining = buffer.remaining();
		byte[] ab = new byte[remaining];
		buffer.get(ab);
		return ab;
	}
615324
def _deserialize(self, stream):
        """"""
        self.version, self.entries, self._extension_data, conten_sha = read_cache(stream)  # @UnusedVariable
        return self