Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions io/io/src/TKey.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ TKey::TKey(const TObject *obj, const char *name, Int_t bufsize, TDirectory* moth
ROOT::RCompressionSetting::EAlgorithm::EValues cxAlgorithm = static_cast<ROOT::RCompressionSetting::EAlgorithm::EValues>(GetFile() ? GetFile()->GetCompressionAlgorithm() : 0);
if (cxlevel > 0 && fObjlen > 256) {
Int_t nbuffers = 1 + (fObjlen - 1)/kMAXZIPBUF;
Int_t buflen = std::max(512,fKeylen + fObjlen + 9*nbuffers + 28); //add 28 bytes in case object is placed in a deleted gap
Int_t buflen = std::max(512, fKeylen + fObjlen);
fBuffer = new char[buflen];
char *objbuf = fBufferRef->Buffer() + fKeylen;
char *bufcur = &fBuffer[fKeylen];
Expand Down Expand Up @@ -345,7 +345,7 @@ TKey::TKey(const void *obj, const TClass *cl, const char *name, Int_t bufsize, T
ROOT::RCompressionSetting::EAlgorithm::EValues cxAlgorithm = static_cast<ROOT::RCompressionSetting::EAlgorithm::EValues>(GetFile() ? GetFile()->GetCompressionAlgorithm() : 0);
if (cxlevel > 0 && fObjlen > 256) {
Int_t nbuffers = 1 + (fObjlen - 1)/kMAXZIPBUF;
Int_t buflen = std::max(512,fKeylen + fObjlen + 9*nbuffers + 28); //add 28 bytes in case object is placed in a deleted gap
Int_t buflen = std::max(512, fKeylen + fObjlen);
fBuffer = new char[buflen];
char *objbuf = fBufferRef->Buffer() + fKeylen;
char *bufcur = &fBuffer[fKeylen];
Expand Down
2 changes: 1 addition & 1 deletion net/net/src/TMessage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Int_t TMessage::Compress()
Int_t messlen = Length() - hdrlen;
Int_t nbuffers = 1 + (messlen - 1) / kMAXZIPBUF;
Int_t chdrlen = 3*sizeof(UInt_t); // compressed buffer header length
Int_t buflen = std::max(512, chdrlen + messlen + 9*nbuffers);
Int_t buflen = std::max(512, chdrlen + messlen);
fBufComp = new char[buflen];
char *messbuf = Buffer() + hdrlen;
char *bufcur = fBufComp + chdrlen;
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/src/TBasket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ Int_t TBasket::WriteBuffer()
cxAlgorithm = static_cast<ROOT::RCompressionSetting::EAlgorithm::EValues>(file->GetCompressionAlgorithm());
if (cxlevel > 0) {
Int_t nbuffers = 1 + (fObjlen - 1) / kMAXZIPBUF;
Int_t buflen = fKeylen + fObjlen + 9 * nbuffers + 28; //add 28 bytes in case object is placed in a deleted gap
Int_t buflen = fKeylen + fObjlen;
InitializeCompressedBuffer(buflen, file);
if (!fCompressedBufferRef) {
Warning("WriteBuffer", "Unable to allocate the compressed buffer");
Expand Down
Loading