242 newCompress = 100 * algorithm + 1;
245 newCompress = 100 * algorithm + level;
260 if (level < 0) level = 0;
261 if (level > 99) level = 99;
268 newCompress = 100 * algorithm + level;
303 if (compressionLevel <= 0) {
334 Int_t nbuffers = 1 + (messlen - 1) / kMAXZIPBUF;
336 Int_t buflen = std::max(512, chdrlen + messlen + 9*nbuffers);
338 char *messbuf =
Buffer() + hdrlen;
343 for (
Int_t i = 0; i < nbuffers; ++i) {
344 if (i == nbuffers - 1)
345 bufmax = messlen - nzip;
348 R__zipMultipleAlgorithm(compressionLevel, &bufmax, messbuf, &bufmax, bufcur, &nout,
349 static_cast<ROOT::ECompressionAlgorithm>(compressionAlgorithm));
350 if (nout == 0 || nout >= messlen) {
360 messbuf += kMAXZIPBUF;
393 Error(
"Uncompress",
"Inconsistency found in header (nin=%d, nbuf=%d)", nin, nbuf);
401 char *messbuf =
fBuffer + hdrlen;
408 R__unzip(&nin, bufcur, &nbuf, (
unsigned char*) messbuf, &nout);
411 if (noutot >= buflen - hdrlen)
break;
void SetCompressionSettings(Int_t settings=1)
virtual TClass * ReadClass(const TClass *cl=0, UInt_t *objTag=0)
Read class definition from I/O buffer.
static TProcessID * GetPID()
static: returns pointer to current TProcessID
void SetBufferOffset(Int_t offset=0)
virtual UInt_t GetUniqueID() const
Return the unique object id.
Int_t Compress()
Compress the message.
void frombuf(char *&buf, Bool_t *x)
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
static Bool_t fgEvolution
TMessage(const TMessage &)
Buffer base class used for serializing objects.
Int_t GetCompressionAlgorithm() const
void SetCompressionAlgorithm(Int_t algorithm=0)
void ResetAllBits(Bool_t value=kFALSE)
Reset all bits to 0 (false).
static Bool_t UsesSchemaEvolutionForAll()
Static function returning status of global schema evolution.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void TagStreamerInfo(TVirtualStreamerInfo *info)
Remember that the StreamerInfo is being used in writing.
void SetWhat(UInt_t what)
Using this method one can change the message type a-posteriory.
int R__unzip_header(Int_t *nin, UChar_t *bufin, Int_t *lout)
void tobuf(char *&buf, Bool_t x)
A TProcessID identifies a ROOT job in a unique way in time and space.
Bool_t TestBitNumber(UInt_t bitnumber) const
void ResetMap()
Delete existing fMap and reset map counter.
void Reset()
Reset the message buffer so we can use (i.e. fill) it again.
void InitMap()
Create the fMap container and initialize them with the null object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t Uncompress()
Uncompress the message.
static void EnableSchemaEvolutionForAll(Bool_t enable=kTRUE)
Static function enabling or disabling the automatic schema evolution.
UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pid is already in the message.
void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)
Force writing the TStreamerInfo to the message.
Int_t GetCompressionLevel() const
virtual void Clear(Option_t *option="")
Remove all objects from the list.
void R__unzip(Int_t *nin, UChar_t *bufin, Int_t *lout, char *bufout, Int_t *nout)
void SetLength() const
Set the message length at the beginning of the message buffer.
virtual void Add(TObject *obj)
void SetCompressionLevel(Int_t level=1)
virtual ~TMessage()
Clean up compression buffer.
Undefined compression algorithm (must be kept the last of the list in case a new algorithm is added)...
Abstract Interface class describing Streamer information for one class.
void Forward()
Change a buffer that was received into one that can be send, i.e.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
void SetWriteMode()
Set buffer in write mode.