18 std::vector<unsigned char>
out(
isize);
19 uLongf destLen = compressBound(
isize);
20 int zerr = compress2(&out.front(), &destLen, &
blob.front(),
isize, 9);
28 Positions::const_iterator pos =
positions.find(name);
30 edm::LogError(
"MultiFileBlob:") << name <<
"already in this object";
36 blob.push_back((
unsigned char)c);
42 os.write((
const char*)(r.first), r.second - r.first);
47 Positions::const_iterator pos =
positions.find(name);
49 edm::LogError(
"MultiFileBlob:") << name <<
"not in this object";
50 return Range(
nullptr,
nullptr);
52 unsigned long long b = (*pos).second;
53 unsigned long long e =
isize;
63 return r.second - r.first;
73 std::vector<unsigned char>
out(
isize);
74 uLongf destLen = out.size();
75 int zerr = uncompress(&out.front(), &destLen, &
blob.front(),
blob.size());
76 if (zerr != 0 || out.size() != destLen)
77 edm::LogError(
"FileBlob") <<
"uncompressing error " << zerr <<
" original size was " <<
isize <<
" new size is "
void write(const std::string &name, std::ostream &os) const
write to ostream
const edm::EventSetup & c
std::pair< unsigned char const *, unsigned char const * > Range
std::vector< unsigned char > blob
void finalized(bool compress)
void read(const std::string &name, std::istream &is)
read from real file give it name name
Log< level::Error, false > LogError
unsigned long long size(const std::string &name) const
Range rawBlob(const std::string &name) const