gzjoin -- command to join gzip files into one gzip file

《算法设计与分析》全套PPT课件(哈尔滨工程大学) 立即下载
/* gzjoin -- command to join gzip files into one gzip file

  Copyright (C) 2004 Mark Adler, all rights reserved
  version 1.0, 11 Dec 2004

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the author be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

  Mark Adler    madler@alumni.caltech.edu
 */

/*
 * Change history:
 *
 * 1.0  11 Dec 2004     - First version
 * 1.1  12 Jun 2005     - Changed ssize_t to long for portability
 */

/*
   gzjoin takes one or more gzip files on the command line and writes out a
   single gzip file that will uncompress to the concatenation of the
   uncompressed data from the individual gzip files.  gzjoin does this without
   having to recompress any of the data and without having to calculate a new
   crc32 for the concatenated uncompressed data.  gzjoin does however have to
   decompress all of the input data in order to find the bits in the compressed
   data that need to be modified to concatenate the streams.

   gzjoin does not do an integrity check on the input gzip files other than
   checking the gzip header and decompressing the compressed data.  They are
   otherwise assumed to be complete and correct.

   Each joint between gzip files removes at least 18 bytes of previous trailer
   and subsequent header, and inserts an average of about three bytes to the
   compressed data in order to connect the streams.  The output gzip file
   has a minimal ten-byte gzip header with no file name or modification time.

   This program was written to illustrate the use of the Z_BLOCK option of
   inflate() and the crc32_combine() function.  gzjoin will not compile with
   versions of zlib earlier than 1.2.3.
 */

#include <stdio.h>      /* fputs(), fprintf(), fwrite(), putc() */
#include <stdlib.h>     /* exit(), malloc(), free() */
#include <fcntl.h>      /* open() */
#include <unistd.h>     /* close(), read(), lseek() */
#include "zlib.h"
    /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */

#define local static

/* exit with an error (return a value to allow use in an expression) */
local int bail(char *why1, char *why2)
{
    fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2);
    exit(1);
    return 0;
}

/* -- simple buffered file input with access to the buffer -- */

#define CHUNK 32768         /* must be a power of two and fit in unsigned */

/* bin buffered input file type */
typedef struct {
    char *name;             /* name of file for error messages */
    int fd;                 /* file descriptor */
    unsigned left;          /* bytes remaining at next */
    unsigned char *next;    /* next byte to read */
    unsigned char *buf;     /* allocated buffer of length CHUNK */
} bin;

/* close a buffered file and free allocated memory */
local void bclose(bin *in)
{
    if (in != NULL) {
        if (in->fd != -1)
            close(in->fd);
        if (in->buf != NULL)
            free(in->buf);
        free(in);
    }
}

/* open a buffered file for input, return a pointer to type bin, or NULL on
   failure */
local bin *bopen(char *name)
{
    bin *in;

    in = malloc(sizeof(bin));
    if (in == NULL)
        return NULL;
    in->buf = malloc(CHUNK);
    in->fd = open(name, O_RDONLY, 0);
    if (in->buf == NULL || in->fd == -1) {
        bclose(in);
        return NULL;
    }
    in->left = 0;
    in->next = in->buf;
    in->name = name;
    return in;
}

/* load buffer from file, return -1 on read error, 0 or 1 on success, with
   1 indicating that end-of-file was reached */
local int bload(bin *in)
{
    long len;

    if (in == NULL)
        return -1;
    if (in->left != 0)
        return 0;
    in->next = in->buf;
    do {
        len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left);
        if (len < 0)
            return -1;
        in->left += (unsigned)len;
    } while (len != 0 && in->left < CHUNK);
    return len == 0 ? 1 : 0;
}

/* get a byte from the file, bail if end of file */
#define bget(in) (in->left ? 0 : bload(in), \
                  in->left ? (in->left--, *(in->next)++) : \
                    bail("unexpected end of file on ", in->name))

/* get a four-byte little-endian unsigned integer from file */
local unsigned long bget4(bin *in)
{
    unsigned long val;

    val = bget(in);
    val += (unsigned long)(bget(in)) << 8;
    val += (unsigned long)(bget(in)) << 16;
    val += (unsigned long)(bget(in)) << 24;
    return val;
}

/* skip bytes in file */
local void bskip(bin *in, unsigned skip)
{
    /* check pointer */
    if (in == NULL)
        return;

    /* easy case -- skip bytes in buffer */
    if (skip <= in->left) {
        in->left -= skip;
        in->next += skip;
        return;
    }

    /* skip what's in buffer, discard buffer contents */
    skip -= in->left;
    in->left = 0;

    /* seek past multiples of CHUNK bytes */
    if (skip > CHUNK) {
        unsigned left;

        left = skip & (CHUNK - 1);
        if (left == 0) {
            /* exact number of chunks: seek all the way minus one byte to check
               for end-of-file with a read */
            lseek(in->fd, skip - 1, SEEK_CUR);
            if (read(in->fd, in->buf, 1) != 1)
                bail("unexpected end of file on ", in->name);
            return;
        }

        /* skip the integral chunks, update skip with remainder */
        lseek(in->fd, skip - left, SEEK_CUR);
        skip = left;
    }

    /* read more input and skip remainder */
    bload(in);
    if (skip > in->left)
        bail("unexpected end of file on ", in->name);
    in->left -= skip;
    in->next += skip;
}

/* -- end of buffered input functions -- */

/* skip the gzip header from file in */
local void gzhead(bin *in)
{
    int flags;

    /* verify gzip magic header and compression method */
    if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8)
        bail(in->name, " is not a valid gzip file");

    /* get and verify flags */
    flags = bget(in);
    if ((flags & 0xe0) != 0)
        bail("unknown reserved bits set in ", in->name);

    /* skip modification time, extra flags, and os */
    bskip(in, 6);

    /* skip extra field if present */
    if (flags & 4) {
        unsigned len;

        len = bget(in);
        len += (unsigned)(bget(in)) << 8;
        bskip(in, len);
    }

    /* skip file name if present */
    if (flags & 8)
        while (bget(in) != 0)
            ;

    /* skip comment if present */
    if (flags & 16)
        while (bget(in) != 0)
            ;

    /* skip header crc if present */
    if (flags & 2)
        bskip(in, 2);
}

/* write a four-byte little-endian unsigned integer to out */
local void put4(unsigned long val, FILE *out)
{
    putc(val & 0xff, out);
    putc((val >> 8) & 0xff, out);
    putc((val >> 16) & 0xff, out);
    putc((val >> 24) & 0xff, out);
}

/* Load up zlib stream from buffered input, bail if end of file */
local void zpull(z_streamp strm, bin *in)
{
    if (in->left == 0)
        bload(in);
    if (in->left == 0)
        bail("unexpected end of file on ", in->name);
    strm->avail_in = in->left;
    strm->next_in = in->next;
}

/* Write header for gzip file to out and initialize trailer. */
local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
{
    fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out);
    *crc = crc32(0L, Z_NULL, 0);
    *tot = 0;
}

/* Copy the compressed data from name, zeroing the last block bit of the last
   block if clr is true, and adding empty blocks as needed to get to a byte
   boundary.  If clr is false, then the last block becomes the last block of
   the output, and the gzip trailer is written.  crc and tot maintains the
   crc and length (modulo 2^32) of the output for the trailer.  The resulting
   gzip file is written to out.  gzinit() must be called before the first call
   of gzcopy() to write the gzip header and to initialize crc and tot. */
local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot,
                  FILE *out)
{
    int ret;                /* return value from zlib functions */
    int pos;                /* where the "last block" bit is in byte */
    int last;               /* true if processing the last block */
    bin *in;                /* buffered input file */
    unsigned char *start;   /* start of compressed data in buffer */
    unsigned char *junk;    /* buffer for uncompressed data -- discarded */
    z_off_t len;            /* length of uncompressed data (support > 4 GB) */
    z_stream strm;          /* zlib inflate stream */

    /* open gzip file and skip header */
    in = bopen(name);
    if (in == NULL)
        bail("could not open ", name);
    gzhead(in);

    /* allocate buffer for uncompressed data and initialize raw inflate
       stream */
    junk = malloc(CHUNK);
    strm.zalloc = Z_NULL;
    strm.zfree = Z_NULL;
    strm.opaque = Z_NULL;
    strm.avail_in = 0;
    strm.next_in = Z_NULL;
    ret = inflateInit2(&strm, -15);
    if (junk == NULL || ret != Z_OK)
        bail("out of memory", "");

    /* inflate and copy compressed data, clear last-block bit if requested */
    len = 0;
    zpull(&strm, in);
    start = strm.next_in;
    last = start[0] & 1;
    if (last && clr)
        start[0] &= ~1;
    strm.avail_out = 0;
    for (;;) {
        /* if input used and output done, write used input and get more */
        if (strm.avail_in == 0 && strm.avail_out != 0) {
            fwrite(start, 1, strm.next_in - start, out);
            start = in->buf;
            in->left = 0;
            zpull(&strm, in);
        }

        /* decompress -- return early when end-of-block reached */
        strm.avail_out = CHUNK;
        strm.next_out = junk;
        ret = inflate(&strm, Z_BLOCK);
        switch (ret) {
        case Z_MEM_ERROR:
            bail("out of memory", "");
        case Z_DATA_ERROR:
            bail("invalid compressed data in ", in->name);
        }

        /* update length of uncompressed data */
        len += CHUNK - strm.avail_out;

        /* check for block boundary (only get this when block copied out) */
        if (strm.data_type & 128) {
            /* if that was the last block, then done */
            if (last)
                break;

            /* number of unused bits in last byte */
            pos = strm.data_type & 7;

            /* find the next last-block bit */
            if (pos != 0) {
                /* next last-block bit is in last used byte */
                pos = 0x100 >> pos;
                last = strm.next_in[-1] & pos;
                if (last && clr)
                    strm.next_in[-1] &= ~pos;
            }
            else {
                /* next last-block bit is in next unused byte */
                if (strm.avail_in == 0) {
                    /* don't have that byte yet -- get it */
                    fwrite(start, 1, strm.next_in - start, out);
                    start = in->buf;
                    in->left = 0;
                    zpull(&strm, in);
                }
                last = strm.next_in[0] & 1;
                if (last && clr)
                    strm.next_in[0] &= ~1;
            }
        }
    }

    /* update buffer with unused input */
    in->left = strm.avail_in;
    in->next = strm.next_in;

    /* copy used input, write empty blocks to get to byte boundary */
    pos = strm.data_type & 7;
    fwrite(start, 1, in->next - start - 1, out);
    last = in->next[-1];
    if (pos == 0 || !clr)
        /* already at byte boundary, or last file: write last byte */
        putc(last, out);
    else {
        /* append empty blocks to last byte */
        last &= ((0x100 >> pos) - 1);       /* assure unused bits are zero */
        if (pos & 1) {
            /* odd -- append an empty stored block */
            putc(last, out);
            if (pos == 1)
                putc(0, out);               /* two more bits in block header */
            fwrite("\0\0\xff\xff", 1, 4, out);
        }
        else {
            /* even -- append 1, 2, or 3 empty fixed blocks */
            switch (pos) {
            case 6:
                putc(last | 8, out);
                last = 0;
            case 4:
                putc(last | 0x20, out);
                last = 0;
            case 2:
                putc(last | 0x80, out);
                putc(0, out);
            }
        }
    }

    /* update crc and tot */
    *crc = crc32_combine(*crc, bget4(in), len);
    *tot += (unsigned long)len;

    /* clean up */
    inflateEnd(&strm);
    free(junk);
    bclose(in);

    /* write trailer if this is the last gzip file */
    if (!clr) {
        put4(*crc, out);
        put4(*tot, out);
    }
}

/* join the gzip files on the command line, write result to stdout */
int main(int argc, char **argv)
{
    unsigned long crc, tot;     /* running crc and total uncompressed length */

    /* skip command name */
    argc--;
    argv++;

    /* show usage if no arguments */
    if (argc == 0) {
        fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n",
              stderr);
        return 0;
    }

    /* join gzip files on command line and write to stdout */
    gzinit(&crc, &tot, stdout);
    while (argc--)
        gzcopy(*argv++, argc, &crc, &tot, stdout);

    /* done */
    return 0;
}

refer:http://svn.python.org/projects/external/zlib/examples/gzjoin.c
数字政府政务服务AI大模型赋能智能体平台及AI场景应用规划方案(决策评审版).pptx 立即下载

相关推荐

T18_低空经济示范区十五五通感一体化低空智联网与飞行服务保障体系设计方案_生态合作版.pptx

T18_低空经济示范区十五五通感一体化低空智联网与飞行服务保障体系设计方案_生态合作版.pptx

zlib 1.2.8 Manual

zlib 1.2.8 Manual Contents PrologueVersionIntroductionStream Data StructuresStructures UsageConstantsBasic FunctionsAdvanced FunctionsUtility Functionsgzip File Access FunctionsChecksum Functi

Wait for 的专栏 2462

T04_城市生命线AI智能体平台及AI大模型应用场景规划方案_技术方案版.pptx

T04_城市生命线AI智能体平台及AI大模型应用场景规划方案_技术方案版.pptx

Linux中使用gzip来压缩/解压 *.gz文件

gzip 是linux中常见的压缩/解压工具,最常见的使用对象是*.gz格式的文件,这里简单介绍下它最常见的用法, GZIP(1) General Commands Manual GZIP(1) NAME      gzip, gunzip, zcat - compress or expand files SYNOPSIS      gzip [ -acdfhklLnNrtv

匿_名_用_户的专栏 20万+

EPLAN自动成图与报表实战合集 API批量成图脚本+端子表电缆表自动生成

内容概要:EPLAN自动成图与报表自动生成实战合集,含2篇原创:API批量成图脚本骨架(对象模型+可运行C#代码+三个必踩坑+42页从3.5小时压到11分钟实测)、端子表/电缆表/部件清单报表自动生成(配置逻辑+翻车点+提效数据)。适用人群:电气设计工程师、成套厂制图员、EPLAN二次开发。使用场景:图纸批量生成提效、报表自动化。原创整理。

多目标粒子群算法求解综合能源系统最优容量配置研究(Matlab代码实现)

内容概要:本文研究了基于多目标粒子群算法(MOPSO)求解综合能源系统(IES)中最优容量配置的方法,并提供了完整的Matlab代码实现。研究旨在通过优化风电机组、光伏机组、燃气轮机、储能系统等多种能源设备的容量配置,实现系统在经济性、环保性和能源利用率等方面的多目标平衡。文中构建了综合能源系统容量配置的数学模型,明确了以最低综合成本、最小碳排放为核心的目标函数,以及能量供需平衡、设备出力能力等关键约束条件,并详细阐述了MOPSO算法的实现流程,包括种群初始化、非支配排序、拥挤距离计算和外部存档更新等核心机制。最后,通过Matlab平台的仿真实验验证了该方法的有效性,结果表明该算法能够生成分布均匀且具有良好多样性的Pareto最优解集,为决策者根据不同侧重点选择最终方案提供了科学依据。; 适合人群:具备一定电力系统、优化算法和Matlab编程基础的研究生、科研人员及工程技术人员。; 使用场景及目标:① 学习和掌握综合能源系统容量配置问题的建模方法;② 深入理解多目标粒子群算法(MOPSO)的核心原理及其在实际工程优化问题中的应用;③ 获取可直接运行和修改的Matlab代码,用于复现研究成果或进行二次开发。; 阅读建议:建议读者在阅读时,首先理解综合能源系统的背景和优化问题的数学建模过程,然后结合提供的Matlab代码,逐步跟踪算法的执行流程,重点关注目标函数和约束条件的代码实现,以及MOPSO算法中非支配排序和拥挤距离计算等核心模块。为了更好地掌握,可以尝试调整算例参数、增减优化目标或修改算法参数,观察结果的变化。

gzip文件格式解析

在windows下使用UltraEdit打开后缀的.gz的文件显示的数据格式如下: 2 bytes  GZIP标志字节:0x1f, 0x8b (\037 \213)   1 byte   压缩方法: (0..7 reserved, 8 = deflate) 1 byte   标志位:             bit 0 set: 文件可能是ASCII文本文件             bi

Mrknowledge 1万+

PSO-LSTM基于PSO优化LSTM网络的电力负荷预测(Python代码实现)

内容概要:本文提出了一种基于粒子群优化算法(PSO)优化长短期记忆网络(LSTM)的电力负荷预测方法,并通过Python代码实现了完整的模型构建与仿真验证。该方法利用PSO算法全局寻优的能力,自动优化LSTM网络的关键超参数,如学习率、隐含层节点数、训练迭代次数等,从而克服传统LSTM依赖人工调参导致的预测精度不高和收敛速度慢的问题。文中详细阐述了PSO-LSTM混合模型的架构设计、算法流程及其实现细节,结合实际电力负荷数据进行了实验验证,结果表明该模型在预测精度、稳定性与泛化能力方面均优于标准LSTM及其他传统预测模型,尤其适用于短期电力负荷预测任务。; 适合人群:具备一定Python编程基础和机器学习理论知识,从事电力系统分析、能源管理、智能电网调度及相关领域研究的研发人员、工程技术人员及高校研究生。; 使用场景及目标:①应用于电力系统短期负荷预测,提升电网运行调度的科学性与经济性;②为能源管理系统提供高精度负荷数据支持,优化发电计划与资源配置;③作为智能优化算法与深度学习融合的教学案例,帮助学习者掌握PSO与LSTM协同建模的方法与实践技巧;④为后续研究提供可复现的代码基础和技术参考。; 阅读建议:建议读者结合提供的Python代码,动手复现整个建模与训练过程,深入理解PSO优化机制与LSTM网络结构的耦合方式,并尝试在不同时间尺度和负荷场景的数据集上进行迁移测试,以全面评估模型的适应性与鲁棒性。

文本文件的换行符:CR , LF ,CR/LF

在文本处理中, CR, LF, CR/LF是不同操作系统上使用的换行符. *Dos和windows采用回车+换行CR/LF表示下一行, *UNIX/Linux采用换行符LF表示下一行, *苹果机(MAC OS系统)则采用回车符CR表示下一行. CR用符号'\r'或'^M'表示, 十进制ASCII代码是13, 十六进制代码为0x0D; LF使用'\n'或'^J'符号表示, A

Mrknowledge 6596

ESP32-S3开发环境避坑指南:VS Code+ESP-IDF离线安装全流程(附国内镜像加速)

本文提供了一份详细的ESP32-S3开发环境离线安装指南,重点解决网络依赖问题。通过整合国内镜像加速,手把手教你完成VS Code、ESP-IDF框架、工具链及Python依赖的本地化部署,实现稳定、可重复的开发环境搭建,大幅提升IoT开发效率。

peach的博客 962

UOS忘记密码别慌!用LiveCD工具5分钟搞定,附命令行救援模式详细步骤

本文详细介绍了UOS系统密码遗忘时的两种解决方案:图形化LiveCD工具和命令行救援模式。针对普通用户,LiveCD工具提供5分钟快速重置密码的便捷操作;而技术人员可通过命令行深度解析系统分区挂载与密码修改流程。文章还包含安全加固建议,帮助用户预防类似问题发生。

weixin_27032989的博客 593

glob 应用示例

/* *?[]{}~ typedef struct{ int gl_patch; char** gl_pathv; int gl_offs; }glob_t GLOB_ERR,GLOB_MARK,GLOB_NOSORT,GLOB_DOOFS,GLOB_NOCHECK,GLOB_APPEND,GLOB_NOESCAPE, GLOB_PERIOD,GLOB_BRCAE,GLOB_ACE,GLOB

Mrknowledge 1240

解决UE5像素流三大痛点:鼠标锁定/双光标/自动播放(附app.js魔改指南)

本文针对UE5像素流服务在实际应用中常见的鼠标锁定、双光标和自动播放三大交互痛点,提供了深入的技术分析和解决方案。通过详细解析app.js源码,指导开发者如何修改控制方案、修复光标显示以及实现静音自动播放,旨在提升Pixel Streaming应用的用户体验与专业度。

weixin_28025327的博客 386

linux 目录遍历示例

#include #include #include #include void do_dir (char dirname[]) { DIR *dir_p; struct dirent *direntp; if((dir_p = opendir (dirname)) == NULL) { printf ("dir ERROR !!\n"); exit (0); }

Mrknowledge 879

基于dify平台批量分析excel格式信息

如何以表格形式批量输入一些信息,然后让大模型以对话应用形式逐条进行推理分析?请逐行分析以下数据,给出推理结果:{{input}}这里提供一个分步解决方案,结合。

knightissocool的博客 8014

手把手教你用STM32实现SPWM逆变器控制(附完整代码)

本文提供了一份基于STM32实现SPWM逆变器控制的完整实战指南。文章从硬件选型(如STM32F103C8T6、IR2104驱动器)入手,详细解析了利用定时器TIM1生成SPWM波形的核心原理与代码实现,并涵盖了驱动电路、全桥功率电路及LC滤波器的设计要点与调试技巧,旨在帮助读者从零构建一个可靠的单相全桥逆变器系统。

weixin_29208327的博客 592

可变参数应用

#include #include void foo(char *fmt, ...) { va_list ap; int d; char c, *s; va_start(ap, fmt); while (*fmt) switch(*fmt++) { case 's': /* 字符串 */ s = va_arg(ap, char *); printf(

Mrknowledge 850

算法真的是个很有用的东西,通过python或者golang实现对N张图片的自动排版,每张图片的长和宽都不一样,有的是横图,有的是竖图,最终需要生成一张完整的矩形图片

算法真的是个很有用的东西,通过python或者golang实现对N张图片的自动排版,每张图片的长和宽都不一样,有的是横图,有的是竖图,最终需要生成一张完整的矩形图片。

代码讲故事 503

sscanf 函数说明

sscanf() - 从一个字符串中读进与指定格式相符的数据   函数原型:   Int sscanf( string str, string fmt, mixed var1, mixed var2 ... );   int scanf( const char *format [,argument]... );   说明:   sscanf与scanf类似,都是用于输入的,只

Mrknowledge 832

Amazon Skills:51个AI技能赋能亚马逊运营,从选品到广告全链路分析

在电商运营领域,数据分析和自动化工具正成为提升效率的关键。其核心原理在于将专业经验转化为结构化指令,使AI能够执行标准化流程。这种技术价值体现在降低专业门槛、提升决策效率,尤其适用于亚马逊这类数据驱动的电商平台。通过将选品、关键词研究、FBA费用计算、PPC广告优化等运营框架编码为可执行指令,AI助手能够模拟专家思维进行市场分析。Amazon Skills项目正是这一理念的实践,它提供51个覆盖运营全链路的技能模块,让卖家在自然对话环境中获得专业分析支持,实现从市场研究到利润核算的自动化工作流。

weixin_27134143的博客 1316

【数据分析】宏基因组alpha和beta多样性分析和差异物种筛选案例

本教程为读者呈现了宏基因组α和β多样性分析的完整案例。通过实际数据和详细步骤,读者可以深入理解这两种分析方法及其在R语言中的实现过程。教程中不仅提供了清晰的代码示例,还对每一步骤进行了详细解释,使读者能够轻松跟随并掌握分析技巧。无论是初学者还是有一定基础的研究者,都能通过本教程快速上手宏基因组多样性分析,为微生物组学研究提供有力支持。

专注生信领域 2224

获取文件信息

#include #include #include #include #include //获取文件大小,单位Byte int getFileSize(char* fileName) { int fd; struct stat stat; if(fd = open(fileName, O_RDONLY) < 0) { printf("Open file

Mrknowledge 830

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

multiset 应用示例

/* * Copyright (c) 2006 All rights reserved. * 文件名:MultiSet.cpp * * 文件标识:MultiSet * 摘要:MultiSet容器编程示例 * 输入:无 * 输出:输出MultiSet容器对象的信息 * * 当前版本 0.01 * 作者:罗 * 完成日期:2006年4月5日 */ #include #inc

Mrknowledge 791

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

上一篇: Hadoop读写文件时内部工作机制
下一篇: HDFS通过java api进行访问
迷途小码
博客等级 码龄19年 71粉丝 95原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值