code: def copytree_and_gzip(self, source_dir, target_dir):
          
          # Figure out what we're building...
          build_list = []
          # Walk through the source directory...
          for (dirpath, dirnames, filenames) in os.walk(source_dir):
              for f in filenames:
                  # Figure out what is going where
                  source_path = os.path.join(dirpath, f)
                  rel_path = os.path.relpath(dirpath, source_dir)
                  target_path = os.path.join(target_dir, rel_path, f)
                  # Add it to our list to build
                  build_list.append((source_path, target_path))
  
          logger.debug("Gzipping {} files".format(len(build_list)))
  
          # Build em all
          if not getattr(self, 'pooling', False):
              [self.copyfile_and_gzip(*u) for u in build_list]
          else:
              cpu_count = multiprocessing.cpu_count()
              logger.debug("Pooling build on {} CPUs".format(cpu_count))
              pool = ThreadPool(processes=cpu_count)
              pool.map(self.pooled_copyfile_and_gzip, build_list)
docs: Copies the provided source directory to the provided target directory.
  
          Gzips JavaScript, CSS and HTML and other files along the way.