diff --git a/[refs] b/[refs]
index e548a42a59539..07cd95dc1df67 100644
--- a/[refs]
+++ b/[refs]
@@ -1,3 +1,3 @@
 ---
 refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
-"refs/heads/CMSSW_7_1_X": c898ddc6a07196e8a684567c553ba38297b0c743
+"refs/heads/CMSSW_7_1_X": 02d2da5028f68c906b262892fd0c944c48847274
diff --git a/trunk/CondFormats/Common/interface/FileBlob.h b/trunk/CondFormats/Common/interface/FileBlob.h
new file mode 100644
index 0000000000000..9a2f7944164c4
--- /dev/null
+++ b/trunk/CondFormats/Common/interface/FileBlob.h
@@ -0,0 +1,45 @@
+#ifndef CondFormats_FileBlob_h
+#define CondFormats_FileBlob_h
+
+#include <vector>
+#include <string>
+#include <iostream>
+
+class FileBlob{
+
+ public:
+  FileBlob() {};
+  /// constructor from file to read
+  FileBlob(const std::string & fname, bool zip);
+  /// constructor from  stream to read
+  FileBlob(std::istream & is, bool zip);
+
+  ~FileBlob(){};
+
+  /// read from real file
+  void read(const std::string&);
+  /// write to real file
+  void write(const std::string&) const;
+  
+  /// read from istream
+  void read(std::istream &);
+  /// write to ostream
+  void write(std::ostream &) const;
+
+  bool isCompressed() const {return compressed;};
+
+  int size() const {return isize;};
+  /// i didn't want to do two copies ... hope this works.
+  std::vector<unsigned char>* getUncompressedBlob() const;
+  void getUncompressedBlob( std::vector<unsigned char>& myblobcopy ) const;
+                                 
+ private:
+  static unsigned int computeFileSize(const std::string &);
+  static unsigned int computeStreamSize(std::istream &);
+
+  std::vector<unsigned char> blob;
+  bool compressed;
+  unsigned int isize;
+};
+
+#endif
diff --git a/trunk/CondFormats/Common/src/FileBlob.cc b/trunk/CondFormats/Common/src/FileBlob.cc
new file mode 100644
index 0000000000000..1bae66fd48c06
--- /dev/null
+++ b/trunk/CondFormats/Common/src/FileBlob.cc
@@ -0,0 +1,139 @@
+#include "CondFormats/Common/interface/FileBlob.h"
+#include "FWCore/MessageLogger/interface/MessageLogger.h"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <zlib.h>
+
+FileBlob::FileBlob(const std::string & fname, bool zip):isize(0){
+  compressed = zip;
+  /*  
+  std::cout << "isize = " << isize 
+	    << "  zip = " << (zip? "true" : "false")
+	    << std::endl;
+  */
+  if (isize==0) isize= computeFileSize(fname);
+  // std::cout << "isize = " << isize << std::endl;
+  blob.reserve(isize);
+  read(fname);
+}
+FileBlob::FileBlob(std::istream& is, bool zip):isize(0) {
+  compressed = zip;
+  if (isize==0) isize= computeStreamSize(is);
+  blob.reserve(isize);
+  read(is);
+}
+
+void FileBlob::read(std::istream & is) {
+  if(compressed){
+    std::vector<unsigned char> in;
+    in.reserve(isize);
+    char c;
+    while (is.get(c))
+      in.push_back((unsigned char)c);
+    /*
+    for(int i=0;i<in.size();i++){
+      std::cout<<in[i];
+    }
+    std::cout<<std::endl;
+    */
+    blob.resize(isize);
+    uLongf destLen = compressBound(in.size());
+    int zerr =  compress2(&*blob.begin(), &destLen,
+                          &*in.begin(), in.size(),
+                          9);
+    if (zerr!=0) edm::LogError("FileBlob")<< "Compression error " << zerr;
+    blob.resize(destLen);  
+  }else{
+    //std::cout << "reading uncompressed" << std::endl;
+    char c;
+    while (is.get(c))
+      blob.push_back( (unsigned char)c);
+    blob.resize(blob.size());
+    isize=blob.size();
+  }
+}
+
+void FileBlob::write(std::ostream & os) const {
+  if(compressed){
+    std::vector<unsigned char> out(isize);
+    uLongf destLen = out.size();
+    int zerr =  uncompress(&*out.begin(),  &destLen,
+                           &*blob.begin(), blob.size());
+    if (zerr!=0 || out.size()!=destLen) 
+      edm::LogError("FileBlob")<< "uncompressing error " << zerr
+                                   << " original size was " << isize
+                                   << " new size is " << destLen;
+    os.write((const char *)(&*out.begin()),out.size());
+  }else{
+    os.write((char *)&*blob.begin(),blob.size());
+  }
+}
+
+std::vector<unsigned char>* FileBlob::getUncompressedBlob() const { 
+  std::vector<unsigned char>*  newblob;
+  if(compressed)
+  {
+    newblob = new std::vector<unsigned char>(isize);
+    uLongf destLen = newblob->size();
+    //    std::cout<<"Store isize = "<<isize<<"; newblob->size() = "<<newblob->size()<<"; destLen = "<<destLen<<std::endl;
+    int zerr =  uncompress(&*(newblob->begin()),  &destLen,
+                           &*blob.begin(), blob.size());
+    if (zerr!=0 || newblob->size()!=destLen) 
+      edm::LogError("FileBlob")<< "uncompressing error " << zerr
+                                   << " original size was " << isize
+                                   << " new size is " << destLen;
+  }else{
+    newblob = new std::vector<unsigned char>(blob);
+  }
+  return newblob;
+ }
+
+void FileBlob::getUncompressedBlob( std::vector<unsigned char>& myblobcopy ) const {
+  if(compressed)
+  {
+    myblobcopy.reserve(isize);
+    uLongf destLen = isize;
+    int zerr =  uncompress(&*myblobcopy.begin(),  &destLen,
+			   &*blob.begin(), blob.size());
+    if (zerr!=0 || myblobcopy.size()!=destLen) 
+      edm::LogError("FileBlob")<< "uncompressing error " << zerr
+                                   << " original size was " << isize
+                                   << " new size is " << destLen;
+  }else{
+    myblobcopy = blob;
+  }
+  
+}
+
+void FileBlob::read(const std::string & fname) {
+     std::ifstream ifile(fname.c_str());
+     if (!ifile) { edm::LogError("FileBlob")<< "file " << fname << " does not exist...";}
+     else read(ifile);
+     ifile.close();
+}
+ 
+void FileBlob::write(const std::string & fname) const {
+  std::ofstream ofile(fname.c_str());
+  write(ofile);
+  ofile.close();
+}
+
+unsigned int FileBlob::computeFileSize(const std::string & fname) {
+  unsigned int is=0;
+  std::ifstream ifile(fname.c_str());
+  if (!ifile) { edm::LogError("FileBlob")<< "file " << fname << " does not exist...";}
+  else is = computeStreamSize(ifile);
+  ifile.close();
+  return is;
+}
+
+unsigned int FileBlob::computeStreamSize(std::istream & is) {
+  unsigned int rs=0;
+  char c;
+  while (is.get(c)) rs++;
+  is.clear();
+  is.seekg(0);
+  return rs;
+}
diff --git a/trunk/CondFormats/Common/src/T_EventSetup_FileBlob.cc b/trunk/CondFormats/Common/src/T_EventSetup_FileBlob.cc
new file mode 100644
index 0000000000000..eaf3fb86ab67a
--- /dev/null
+++ b/trunk/CondFormats/Common/src/T_EventSetup_FileBlob.cc
@@ -0,0 +1,4 @@
+#include "CondFormats/Common/interface/FileBlob.h"
+#include "FWCore/Framework/interface/eventsetupdata_registration_macro.h"
+
+EVENTSETUP_DATA_REG(FileBlob);
diff --git a/trunk/CondFormats/Common/src/classes.h b/trunk/CondFormats/Common/src/classes.h
index f2a8712c0ad0c..75a8a232ac02c 100644
--- a/trunk/CondFormats/Common/src/classes.h
+++ b/trunk/CondFormats/Common/src/classes.h
@@ -1,6 +1,7 @@
 #include "CondFormats/Common/interface/IOVSequence.h"
 #include "CondFormats/Common/interface/PayloadWrapper.h"
 #include "CondFormats/Common/interface/GenericSummary.h"
+#include "CondFormats/Common/interface/FileBlob.h"
 
 #include "CondFormats/Common/interface/BaseKeyed.h"
 #include "CondFormats/Common/interface/IOVKeysDescription.h"
diff --git a/trunk/CondFormats/Common/src/classes_def.xml b/trunk/CondFormats/Common/src/classes_def.xml
index 422071cab6320..72d4d85c4ef80 100644
--- a/trunk/CondFormats/Common/src/classes_def.xml
+++ b/trunk/CondFormats/Common/src/classes_def.xml
@@ -14,6 +14,10 @@
  <class name="cond::IOVDescription"/>
  <class name="cond::IOVUserMetaData"/>
 
+ <class name="FileBlob" class_version="0">
+   <field name="blob" mapping="blob"/>
+ </class>
+
 
 <class name="cond::SmallWORMDict"/>
 <class name="cond::IOVKeysDescription"/>
diff --git a/trunk/CondFormats/Common/xml/FileBlob_automatic_default_0.xml b/trunk/CondFormats/Common/xml/FileBlob_automatic_default_0.xml
new file mode 100644
index 0000000000000..84b44e6191f55
--- /dev/null
+++ b/trunk/CondFormats/Common/xml/FileBlob_automatic_default_0.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<!DOCTYPE PoolDatabase SYSTEM "InMemory">
+ <PoolDatabase >
+  <PoolContainer name="FileBlob" >
+   <Class table="FILEBLOB" id_columns="ID" name="FileBlob" mapping_version="FileBlob_automatic_default" >
+     <Blob column="DBLOB" name="blob" />
+     <Primitive column="DCOMPRESSED" name="compressed" />
+     <Primitive column="DISIZE" name="isize" />
+   </Class >
+  </PoolContainer >
+ </PoolDatabase >