throw an exception if the compression codec is not available
added a method to check the availability of a codec