I am not sure that strlen would work here, have a look at the test:
https://github.com/OpenMS/OpenMS/blob/develop/src/tests/class_tests/openms/source/CompressedInputSource_test.cpp#L54
somebody thought it would be a good idea to input a non-null terminated character array, see also here in the actual code:
```
      char bz[2];
      file.read(bz, 2);
      xercesc::InputSource * source;

      char g1 = 0x1f;
      char g2 = 0;
      g2 |= 1 << 7;
      g2 |= 1 << 3;
      g2 |= 1 << 1;
      g2 |= 1 << 0;
      //g2 = static_cast<char>(0x8b); // can make troubles if it is casted to 0x7F which is the biggest number signed char can save
      if ((bz[0] == 'B' && bz[1] == 'Z') || (bz[0] == g1 && bz[1] == g2))
      {
        source = new CompressedInputSource(StringManager().convert(filename.c_str()), bz);
      }
```

https://github.com/OpenMS/OpenMS/blob/develop/src/openms/source/FORMAT/XMLFile.cpp#L124