Hello,
I'd like to use once created object of StringSource class several times
to handle Gzip filter. But after I create it and first read the output
by Get() method, it stops with 'Aborted' error when I do Put() with
another portion of data.
Here's the code:
#include <stdio.h>
#include "crypto/cryptlib.h"
#include "crypto/gzip.h"
using namespace CryptoPP;
using namespace std;
void main()
{
byte string[]="blahblahblah";
byte string2[]="BLAHBLAHBLAH";
byte buffer[100];
StringSource ss(string,10,true,new Gzip);
ss.Get(buffer,20);
printf("test\n");
// it dies here
ss.Put(string2,(unsigned int) 10,true);
printf("test2\n");
ss.Get(buffer,20);
}
$ ./mini
test
Aborted
Whad do I do wrong?
thank you
Jakub Jermak
--
BOFH excuse #119:
evil hackers from Serbia.