On Tuesday, December 22, 2015 at 4:24:31 AM UTC-5, Jeffrey Walton wrote:
>
>
>>
> This might be a little closer to what you are doing:
>
> MeterFilter* meter;
> StreamTransformationFilter* stf;
>
> FileSource fs("/dev/zero", false, stf = new
> StreamTransformationFilter(enc, meter = new MeterFilter(new
> FileSink("/dev/null"))));
>
> unsigned int remaining = BIG_SIZE;
> while(remaining)
> {
> if(remaining % (1024*1024) == 0)
> {
> cout << "Processed: " << meter->GetTotalBytes();
> cout << ", Available: " << stf->MaxRetrievable() << endl;
> }
>
> const unsigned int req = STDMIN(remaining, BLOCK_SIZE);
> fs.Pump(req);
> remaining -= req;
> }
>
> Jeff
>
Many thanks Jeff! I will give it a shot.
Any idea why this isn't done already internally? I would have figured that
this would be how it was implemented. Why doesn't FileSource take a block
size?
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.