亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ccmprs.cpp

?? A command-line file compression utility for Windows NT. It allows you to select files for NTFS fil
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
//**************************************************************************
//
//  CCMPRS -- Conditional File Compression Utility for Windows NT
//
//  Written by Robert Epps
//
//  This program and its source are in the public domain.  If you find any
//  bugs, or add features to this program, I'd like to hear about them!
//  Please write to me at:
//
//  Internet:  robepps@valleynet.com
//  CIS:       72560,3353
//  AOL:       RobertE49
//
//**************************************************************************
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>


//**************************************************************************
// Global variables representing the various options.
//**************************************************************************
char   szFileSpec[_MAX_PATH];       // Path and filename of file(s) to examine
BOOL   bRecurse    = FALSE;         // TRUE = recurse into subdirectories
BOOL   bDecompress = FALSE;         // TRUE = do decompression
BOOL   bQuiet      = FALSE;         // TRUE = don't display any status info
double threshold   = 0.75;          // Allow compression if (compressed size) <= (uncompressed size) * threshold
double MinFileSize = 0;             // Minimum uncompressed size for file to be compressed

char *szIgnoreExts;                 // Points to string containing extensions of files to ignore (command-delimited)
char *szExts;                       // Points to copy of above string, used for strtok() parsing

UINT nCompressed;                   // # of files compressed
UINT nDecompressed;                 // # of files decompressed
double sizechange;                  // Total size change after files compressed/decompressed

char szTemp[_MAX_PATH];


//**************************************************************************
//  Routine to display helpful instructions.
//**************************************************************************
void DisplayUsage(void)
{
    printf("CCMPRS -- Conditional File Compression/Decompression Utility\n\n");
    printf("Command line format is:\n\n");
    printf("  ccmprs filespec [options]\n\n");
    printf("where filespec is the path and filename (wildcards allowed) of the\n");
    printf("file(s) to be examined.  The options are:\n\n");
    printf("  -s  : Examine files in subdirectories as well as the specified directory.\n");
    printf("  -d  : Decompress any compressed files encountered that do not meet the\n");
    printf("        specified conditions for compression.\n");
    printf("  -t# : Compress file only if resulting file size is # percent or less of\n");
    printf("        the uncompressed size.  If this option is not specified, the default\n");
    printf("        is 75 percent.\n");
    printf("  -m# : Compress file only if its uncompressed size is at least # bytes.  If\n");
    printf("        this option is not specified, the default is 0.\n");
    printf("  -xa[,b[,c...]] : Ignore files with the specified extension(s).  For example,\n");
    printf("        -xzip,gif would ignore ZIP and GIF files.\n");
    printf("  -q  : Operate quietly, with no status info displayed.\n\n");
    //printf("For example:  ccmprs d:\\letters\\*.txt -s -t66.6 -m500000\n\n");
    //printf("This would examine all uncompressed files with file extension .txt, in the\n");
    //printf("directory d:\\letters and all of its subdirectories.  Each file at least 500000\n");
    //printf("bytes in length is compressed.  If the size of the resulting compressed file is\n");
    //printf("66.6%% or less of the uncompressed size, the file is left compressed, otherwise\n");
    //printf("it is restored to its original uncompressed state.\n");
}


//**************************************************************************
//
//  Routine returns TRUE if volume containing the specified path supports
//  file compression, FALSE if not.  The path is assumed to be a full path,
//  either UNC or DOS format.
//
//**************************************************************************
BOOL DriveIsCompressible(LPSTR lpszFileSpec)
{
    char  szRoot[4];
    DWORD dwFlags;
    BOOL  bRet = FALSE;

    do
    {
        // Extract the root directory.
        strncpy(szRoot, lpszFileSpec, 3);
        szRoot[3] = 0;

        // Get information on the volume.
        if (!GetVolumeInformation(szRoot, NULL, 0, NULL, NULL, &dwFlags, NULL, NULL))
            break;

        // Return TRUE if volume supports file compression.
        if (dwFlags & FS_FILE_COMPRESSION)
            bRet = TRUE;

    } while (FALSE);

    return bRet;
}


//**************************************************************************
//  Routine to read the command line parameters and set the various global
//  variables accordingly.
//**************************************************************************
BOOL GetParameters(int ac, char *av[])
{
    int i;

    // For each item in the command line...
    for (i = 1; i < ac; i++)
    {
        // Process option or file specification.
        if (*av[i] == '-')
        {
            switch (*(av[i] + 1))
            {
                case 's':               // The "look at subdirectories" option
                case 'S':
                    bRecurse = TRUE;
                    break;

                case 'q':               // The "be quiet!" option
                case 'Q':
                    bQuiet = TRUE;
                    break;

                case 'd':               // The "decompress" option
                case 'D':
                    bDecompress = TRUE;
                    break;

                case 'm':               // The "minimum size" option
                case 'M':
                    MinFileSize = atof(av[i] + 2);
                    if (MinFileSize < 0)
                    {
                        printf("Invalid minimum file size of %.0lf bytes specified.\n", MinFileSize);
                        return FALSE;
                    }
                    break;

                case 't':               // The "compression threshold" option
                case 'T':
                    threshold = atof(av[i] + 2);
                    if (threshold <= 0 || threshold > 100.0)
                    {
                        printf("Invalid compression threshold of %lf%% specified.\n", threshold);
                        return FALSE;
                    }
                    threshold /= 100.0;
                    break;

                case 'x':               // The "ignore file extensions" option
                case 'X':
                    if (*(av[i] + 2))
                    {
                        if (szIgnoreExts)
                        {
                            // Append extensions to current list of extensions.
                            char *p = (char *)realloc(szIgnoreExts, strlen(szIgnoreExts) + strlen(av[i] + 2) + 2);
                            if (p)
                            {
                                szIgnoreExts = p;
                                strcat(szIgnoreExts, ",");
                                strcat(szIgnoreExts, av[i] + 2);
                                strlwr(szIgnoreExts);
                            }
                        }
                        else
                        {
                            // Make new list of extensions.
                            szIgnoreExts = (char *)malloc(strlen(av[i] + 2) + 1);
                            if (szIgnoreExts)
                            {
                                strcpy(szIgnoreExts, av[i] + 2);
                                strlwr(szIgnoreExts);
                            }
                        }

                    }
                    break;

                default:
                    printf("The -%c option is not a valid option.\n", *(av[i] + 1));
                    return FALSE;
            }
        }
        else
        {
            _fullpath(szFileSpec, av[i], _MAX_PATH);
        }
    }

    // Check for file name.
    if (!szFileSpec[0])
    {
        printf("No file name was specified.\n");
        return FALSE;
    }

    // Make sure that the drive supports compression.
    if (!DriveIsCompressible(szFileSpec))
    {
        printf("The specified volume does not support file-level compression.\n");
        return FALSE;
    }

    // Allocate space for copy of file extensions string.
    if (szIgnoreExts)
    {
        szExts = (char *)malloc(strlen(szIgnoreExts) + 1);
        if (!szExts)
        {
            free(szIgnoreExts);
            szIgnoreExts = NULL;
        }
    }

    return TRUE;
}


//**************************************************************************
//**************************************************************************
BOOL SetFileCompression(LPSTR lpszFile, BOOL bCompress)
{
    HANDLE hFile;
    USHORT uMode;
    DWORD  dwAttributes;
    BOOL   bRet = FALSE;

    do
    {
        // Get the file's current compression state.
        dwAttributes = GetFileAttributes(lpszFile);
        if (dwAttributes == 0xFFFFFFFF)
            break;

        // If the file is already in the desired state, return now.
        if (!bCompress == !(dwAttributes & FILE_ATTRIBUTE_COMPRESSED))
        {
            bRet = TRUE;
            break;
        }

        // Open the file.
        hFile = CreateFile(szTemp, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_READONLY, NULL);
        if (hFile == INVALID_HANDLE_VALUE)
            break;

        // Set the file's compression state.
        uMode = bCompress ? COMPRESSION_FORMAT_DEFAULT : COMPRESSION_FORMAT_NONE;
        bRet = DeviceIoControl(hFile, FSCTL_SET_COMPRESSION, &uMode, sizeof(uMode), NULL, 0, &dwAttributes, NULL);

        // Close the file.
        CloseHandle(hFile);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三四久久| 国产精品女主播av| 一本大道久久a久久综合| 国产综合久久久久影院| 日韩av电影免费观看高清完整版| 一区二区三区在线视频观看58 | 久久99国产精品久久99| 亚洲第一二三四区| 一区二区欧美视频| 亚洲在线免费播放| 亚洲成人免费观看| 日韩成人免费电影| 日本成人在线电影网| 捆绑紧缚一区二区三区视频| 老司机午夜精品99久久| 国产精品一区专区| 成人理论电影网| 在线精品视频小说1| 欧美精品xxxxbbbb| 日韩美女主播在线视频一区二区三区| 精品国产青草久久久久福利| 久久午夜免费电影| 亚洲欧洲成人精品av97| 一区二区三区精品| 日韩vs国产vs欧美| 精品一区二区三区在线观看国产| 国产一区二区三区免费| 不卡的av中国片| 欧美视频在线播放| 日韩欧美在线网站| 中文av字幕一区| 亚洲高清免费观看| 久久精品理论片| 91免费视频网址| 欧美一区二区精品| 自拍偷拍亚洲综合| 奇米888四色在线精品| 久久99精品网久久| 在线视频综合导航| 久久精品一二三| 国模少妇一区二区三区| 99久久免费视频.com| 欧美一区在线视频| 国产精品你懂的在线欣赏| 亚洲精品日韩专区silk| 日本中文字幕一区| 91蜜桃免费观看视频| 日韩欧美精品三级| 亚洲免费大片在线观看| 国产原创一区二区| 欧美在线观看视频在线| 国产人妖乱国产精品人妖| 午夜视频一区二区| 91亚洲大成网污www| 久久综合久久99| 亚洲第一激情av| 99久久婷婷国产综合精品电影 | 亚洲日本va在线观看| 美女www一区二区| 色天天综合色天天久久| 精品少妇一区二区三区在线视频| 亚洲私人影院在线观看| 裸体在线国模精品偷拍| 欧美午夜一区二区三区| 国产精品不卡在线观看| 久久蜜桃av一区二区天堂| 日韩va亚洲va欧美va久久| 在线视频综合导航| 亚洲免费在线视频一区 二区| 国产九色sp调教91| 精品久久久网站| 免费看日韩精品| 3d成人动漫网站| 亚洲一区二区欧美激情| 91视频观看视频| 亚洲视频在线观看一区| 成年人午夜久久久| 国产精品高潮呻吟久久| caoporm超碰国产精品| 欧美国产乱子伦| 国产成人综合精品三级| 久久婷婷一区二区三区| 国产真实乱对白精彩久久| 久久嫩草精品久久久久| 国产福利一区在线| 国产欧美一区二区三区在线看蜜臀 | 亚洲欧美综合在线精品| 国产suv精品一区二区三区| 久久网这里都是精品| 国产精品12区| 国产日韩欧美高清| 99亚偷拍自图区亚洲| 亚洲女同女同女同女同女同69| 色婷婷综合久久久中文字幕| 亚洲高清视频中文字幕| 91精品国产综合久久婷婷香蕉| 午夜久久久久久| 欧美不卡一区二区| 成人中文字幕合集| 亚洲三级免费电影| 欧美中文字幕久久| 蜜桃久久久久久久| 欧美国产欧美亚州国产日韩mv天天看完整| 国产91精品精华液一区二区三区 | 欧美午夜精品免费| 午夜电影网亚洲视频| 精品欧美乱码久久久久久| 夫妻av一区二区| 一区二区三区中文在线| 日韩一区二区免费电影| 国产精品123| 亚洲国产毛片aaaaa无费看| 欧美一卡二卡在线观看| 成人午夜视频在线| 午夜精品福利一区二区蜜股av| 日韩欧美第一区| 97精品久久久久中文字幕 | 亚洲欧洲99久久| 欧美日精品一区视频| 久久激情综合网| 亚洲青青青在线视频| 欧美一级夜夜爽| a美女胸又www黄视频久久| 秋霞电影一区二区| 亚洲视频每日更新| xf在线a精品一区二区视频网站| 91色.com| 国内精品写真在线观看| 亚洲国产美女搞黄色| 国产精品视频免费| 日韩精品在线一区二区| 99国产精品一区| 国产在线看一区| 亚洲成av人影院在线观看网| 中文字幕精品三区| 日韩视频免费直播| 在线观看成人小视频| 国产91精品一区二区麻豆亚洲| 午夜久久福利影院| 亚洲视频一区在线| 国产欧美精品一区二区三区四区| 欧美性生活一区| 99久久99久久综合| 国产一区二区三区四区五区美女| 日韩av一二三| 婷婷开心激情综合| 一区二区三区精品视频在线| 国产精品国产三级国产三级人妇 | 欧美男生操女生| 91久久久免费一区二区| 播五月开心婷婷综合| 激情综合色丁香一区二区| 午夜精品久久久| 一二三四社区欧美黄| 亚洲欧美一区二区在线观看| 国产精品免费视频网站| 久久久久久免费| 精品久久久久久久久久久久包黑料| 欧美性猛交xxxx黑人交| 在线观看精品一区| 欧洲av一区二区嗯嗯嗯啊| 94色蜜桃网一区二区三区| 国产成人久久精品77777最新版本| 久久99久国产精品黄毛片色诱| 日本成人在线不卡视频| 蜜臀91精品一区二区三区| 美女精品自拍一二三四| 奇米精品一区二区三区在线观看 | 91久久奴性调教| 91国产免费看| 欧美性生活一区| 在线观看91精品国产麻豆| 日韩一区二区三区三四区视频在线观看| 欧美三级视频在线| 欧美精品黑人性xxxx| 日韩一区二区三区四区五区六区| 日韩一卡二卡三卡| 久久久久久毛片| 中文字幕在线不卡一区| 亚洲伦在线观看| 亚洲成人av福利| 久久国产福利国产秒拍| 成人av网在线| 欧美影院午夜播放| 欧美一卡2卡三卡4卡5免费| 26uuu国产日韩综合| 国产精品成人免费精品自在线观看 | 天堂成人免费av电影一区| 奇米影视在线99精品| 国产酒店精品激情| 91麻豆成人久久精品二区三区| 一本久久综合亚洲鲁鲁五月天 | 美女免费视频一区二区| 国产精品自拍三区| 99国内精品久久| 欧美成人a∨高清免费观看| 中文幕一区二区三区久久蜜桃| 一区二区欧美视频| 国产一区二区在线视频| 一本久道久久综合中文字幕|