def _GetDecryptedStreamSize(self):
    self._file_object.seek(0, os.SEEK_SET)

    self._decrypter = self._GetDecrypter()
    self._decrypted_data = b''

    encrypted_data_offset = 0
    encrypted_data_size = self._file_object.get_size()
    decrypted_stream_size = 0

    while encrypted_data_offset < encrypted_data_size:
      read_count = self._ReadEncryptedData(self._ENCRYPTED_DATA_BUFFER_SIZE)
      if read_count == 0:
        break

      encrypted_data_offset += read_count
      decrypted_stream_size += self._decrypted_data_size

    return decrypted_stream_size
Make sure exception is pickleable.
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/file_io/encrypted_stream_io.py/EncryptedStream._GetDecryptedStreamSize--crossover with--dataset/ETHPy150Open kmike/tornado-slacker/slacker/serialization.py/get_pickleable_exception