grr/server/grr_response_server/file_store.py
def _GetChunk(self):
    """Fetches a chunk corresponding to the current offset."""

    found_ref = None
    for ref in self._blob_refs:
      if self._offset >= ref.offset and self._offset < (ref.offset + ref.size):
        found_ref = ref
        break

    if not found_ref:
      return None, None

    # If self._current_ref == found_ref, then simply return previously found
    # chunk. Otherwise, update self._current_chunk value.
    if self._current_ref != found_ref:
      self._current_ref = found_ref

      data = data_store.BLOBS.ReadBlobs([found_ref.blob_id])
      self._current_chunk = data[found_ref.blob_id]

    return self._current_chunk, self._current_ref
Fetches a chunk corresponding to the current offset.
Fetches a chunk corresponding to the current offset.
Fetches a chunk corresponding to the current offset .
def _GetChunk(self):
    found_ref = None
    for ref in self._blob_refs:
      if self._offset >= ref.offset and self._offset < (ref.offset + ref.size):
        found_ref = ref
        break
    if not found_ref:
      return None, None
    if self._current_ref != found_ref:
      self._current_ref = found_ref
      data = data_store.BLOBS.ReadBlobs([found_ref.blob_id])
      self._current_chunk = data[found_ref.blob_id]
    return self._current_chunk, self._current_ref
def _GetChunk ( self ) : found_ref = None for ref in self . _blob_refs : if self . _offset >= ref . offset and self . _offset < ( ref . offset + ref . size ) : found_ref = ref break if not found_ref : return None , None if self . _current_ref != found_ref : self . _current_ref = found_ref data = data_store . BLOBS . ReadBlobs ( [ found_ref . blob_id ] ) self . _current_chunk = data [ found_ref . blob_id ] return self . _current_chunk , self . _current_ref
Fetches a chunk corresponding to the current offset.
Fetches a chunk corresponding to the current offset .
"""Fetches a chunk corresponding to the current offset.""" # If self._current_ref == found_ref, then simply return previously found # chunk. Otherwise, update self._current_chunk value.
self