32 std::vector<unsigned char>
in;
36 in.push_back((
unsigned char)
c);
44 uLongf destLen = compressBound(
in.size());
45 int zerr = compress2(&*
blob.begin(), &destLen, &*
in.begin(),
in.size(), 9);
53 blob.push_back((
unsigned char)
c);
61 std::vector<unsigned char>
out(
isize);
62 uLongf destLen =
out.size();
63 int zerr = uncompress(&*
out.begin(), &destLen, &*
blob.begin(),
blob.size());
64 if (
zerr != 0 ||
out.size() != destLen)
65 edm::LogError(
"FileBlob") <<
"uncompressing error " <<
zerr <<
" original size was " <<
isize <<
" new size is "
67 os.write(reinterpret_cast<const char*>(&*
out.begin()),
out.size());
69 os.write(reinterpret_cast<const char*>(&*
blob.begin()),
blob.size());
74 std::unique_ptr<std::vector<unsigned char> > newblob;
76 newblob.reset(
new std::vector<unsigned char>(
isize));
77 uLongf destLen = newblob->size();
79 int zerr = uncompress(&*(newblob->begin()), &destLen, &*
blob.begin(),
blob.size());
80 if (
zerr != 0 || newblob->size() != destLen)
81 edm::LogError(
"FileBlob") <<
"uncompressing error " <<
zerr <<
" original size was " <<
isize <<
" new size is "
84 newblob.reset(
new std::vector<unsigned char>(
blob));
91 myblobcopy.reserve(
isize);
92 uLongf destLen =
isize;
93 int zerr = uncompress(&*myblobcopy.begin(), &destLen, &*
blob.begin(),
blob.size());
94 if (
zerr != 0 || myblobcopy.size() != destLen)
95 edm::LogError(
"FileBlob") <<
"uncompressing error " <<
zerr <<
" original size was " <<
isize <<
" new size is "