I am trying to use the CEZCompressor-class defines in EZCompressor.h to compress a descriptor. I do something like this:
// "this" is implementing MEZBufferManager,
// but the implementation I have left the methods "empty"
iCompressor=CEZCompressor::NewL(*this);
// InitializeL() of MEZBufferManager gets called by the above call
iCompressed=HBufC8::NewL(20000); // allocating space for output
TPtr8 ptrCompressed=iCompressed->Des();
iCompressor->SetOutput(ptrCompressed);
iCompressor->SetInput(*data); // data is HBufC8 with input data
// the input data in my tests is NOT longer than the output buffer
TBool def=iCompressor->DeflateL();
// NeedsInputL() of MEZBufferManager gets called in the above call
// Return value (def) is ETrue and by inspection the all
// avail input has been consumed, but there is only 2 bytes in
// total output (this might be the 2 bytes zlib header, I guess...)
// iCompressor->OutputDescriptor().Length() is also just 2
What am I doing wrong? Or what do I have to do, to get the full output flushed to the output buffer? I have tried additional calls to DeflateL() without any further result. Also, what does the return-value of DeflateL() mean?