public static function minify($content, $options = array())
    {
        $id = (isset($options['id']) && $options['id']) ? $options['id'] : '';
        $content = str_replace("\r\n", "\n", $content);

        $lines = explode("\n", $content);
        $numLines = count($lines);
        // determine left padding
        $padTo = strlen((string) $numLines); // e.g. 103 lines = 3 digits
        $inComment = false;
        $i = 0;
        $newLines = array();

        while (null !== ($line = array_shift($lines))) {
            if (('' !== $id) && (0 === $i % 50)) {
                if ($inComment) {
                    array_push($newLines, '', "/* {$id} *|", '');
                } else {
                    array_push($newLines, '', "/* {$id} */", '');
                }
            }

            ++$i;
            $newLines[] = self::_addNote($line, $i, $inComment, $padTo);
            $inComment = self::_eolInComment($line, $inComment);
        }

        $content = implode("\n", $newLines) . "\n";

        // check for desired URI rewriting
        if (isset($options['currentDir'])) {
            Minify_CSS_UriRewriter::$debugText = '';
            $docRoot = isset($options['docRoot']) ? $options['docRoot'] : $_SERVER['DOCUMENT_ROOT'];
            $symlinks = isset($options['symlinks']) ? $options['symlinks'] : array();

            $content = Minify_CSS_UriRewriter::rewrite($content, $options['currentDir'], $docRoot, $symlinks);

            $content = "/* Minify_CSS_UriRewriter::\$debugText\n\n"
                 . Minify_CSS_UriRewriter::$debugText . "*/\n"
                 . $content;
        }

        return $content;
    }