code: @Override
    public byte[] transformIn(Blob blob) throws CpoException {
  
      byte[] buffBytes = new byte[1024];
      byte[] retBytes = null;
      int length;
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
  
      if (blob != null) {
        try {
          InputStream bis = blob.getBinaryStream();
          if (bis != null) {
            CpoByteArrayInputStream cbais = CpoByteArrayInputStream.getCpoStream(bis);
  
            if (cbais.getLength() > 0) {
              GZIPInputStream gzis = new GZIPInputStream(cbais);
  
              while ((length = gzis.read(buffBytes)) != -1) {
                bos.write(buffBytes, 0, length);
              }
              bos.flush();
              bos.close();
              gzis.close();
              cbais.close();
              retBytes = bos.toByteArray();
            } else {
              retBytes = new byte[0];
            }
          }
        } catch (Exception e) {
          logger.error("Error in transform GZipBlob", e);
          throw new CpoException(e);
        }
      }
      return retBytes;
    }
docs: Transforms the datasource object into an object required by the class
  
  @param cpoAdapter The CpoAdapter for the datasource where the attribute is being retrieved
  @param parentObject The object that contains the attribute being retrieved.
  @param The object that represents the datasource object being retrieved
  @return The object to be stored in the attribute
  @throws CpoException