zstd压缩最终

本文详细介绍了如何在C++项目中使用Zstandard(zstd)库进行数据压缩,包括库的安装、API使用方法以及实际压缩和解压缩的示例代码,帮助开发者理解并应用zstd压缩技术。
摘要由CSDN通过智能技术生成
/*
 * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under both the BSD-style license (found in the
 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
 * in the COPYING file in the root directory of this source tree).
 * You may select, at your option, one of the above-listed licenses.
 */


#include <stdio.h>     // printf
#include <stdlib.h>    // free
#include <string.h>    // memset, strcat, strlen
#include <zstd.h>      // presumes zstd library is installed
#include "common.h"    // Helper functions, CHECK(), and CHECK_ZSTD()


static void compressFile_orDie(const char* fname, const char* outName, int cLevel)
{
    /* Open the input and output files. */
    //FILE* const fin  = fopen_orDie(fname, "rb");

    char fin[]="12345678";
    char din[]="33333333";
    size_t SIZE = strlen(fin);
    FILE* const fou
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值