[serialization] deserializing chunk by chunk
Hi, I have an encrypted archive. I can decrypt the file chunk by chunk. I wonder if there is a way to deserialize each chunk on the fly. The main purpose is to reduce the memory footprint of the application since the archive can be a few hundred mega bytes. The problem as I mentioned is the file is encrypted and it has to be decrypted first in the memory and then deserialized. Thanks, Arash
On 12/24/2012 5:33 PM, Arash Abghari wrote:
Hi,
I have an encrypted archive. I can decrypt the file chunk by chunk. I wonder if there is a way to deserialize each chunk on the fly. The main purpose is to reduce the memory footprint of the application since the archive can be a few hundred mega bytes. The problem as I mentioned is the file is encrypted and it has to be decrypted first in the memory and then deserialized.
Have you looked at boost iostreams library? You can create a filter to provide a decrypted stream which is then used by the input archive. See: http://www.boost.org/doc/libs/1_52_0/libs/iostreams/doc/index.html Jeff
On 31/12/12 08:17 AM, Jeff Flinn wrote:
I have an encrypted archive. I can decrypt the file chunk by chunk. I wonder if there is a way to deserialize each chunk on the fly. The main purpose is to reduce the memory footprint of the application since the archive can be a few hundred mega bytes. The problem as I mentioned is the file is encrypted and it has to be decrypted first in the memory and then deserialized.
Have you looked at boost iostreams library? You can create a filter to provide a decrypted stream which is then used by the input archive. See:
http://www.boost.org/doc/libs/1_52_0/libs/iostreams/doc/index.html
Jeff I will try that.
Thanks, Arash
participants (2)
-
Arash Abghari
-
Jeff Flinn