code: def compress_directory(dicom_directory):
      
      if _is_compressed(dicom_directory):
          return
  
      logger.info('Compressing dicom files in %s' % dicom_directory)
      for root, _, files in os.walk(dicom_directory):
          for dicom_file in files:
              if is_dicom_file(os.path.join(root, dicom_file)):
                  _compress_dicom(os.path.join(root, dicom_file))
docs: This function can be used to convert a folder of jpeg compressed images to an uncompressed ones
  
      :param dicom_directory: directory of dicom files to compress