mirror of
https://github.com/facebook/zstd.git
synced 2025-08-01 09:47:01 +03:00
unified ctx naming convention
This commit is contained in:
@ -232,17 +232,16 @@ unsigned long long FIO_compressFilename(const char* output_filename, const char*
|
||||
FILE* finput;
|
||||
FILE* foutput;
|
||||
size_t sizeCheck, cSize;
|
||||
ZSTD_Cctx* ctx;
|
||||
ZSTD_CCtx* ctx = ZSTD_createCCtx();
|
||||
|
||||
|
||||
/* Init */
|
||||
FIO_getFileHandles(&finput, &foutput, input_filename, output_filename);
|
||||
ctx = ZSTD_createCCtx();
|
||||
|
||||
/* Allocate Memory */
|
||||
inBuff = (BYTE*)malloc(inBuffSize);
|
||||
outBuff = (BYTE*)malloc(outBuffSize);
|
||||
if (!inBuff || !outBuff) EXM_THROW(21, "Allocation error : not enough memory");
|
||||
if (!inBuff || !outBuff || !ctx) EXM_THROW(21, "Allocation error : not enough memory");
|
||||
inSlot = inBuff;
|
||||
inEnd = inBuff + inBuffSize;
|
||||
|
||||
@ -371,7 +370,7 @@ unsigned long long FIOv01_decompressFrame(FILE* foutput, FILE* finput)
|
||||
unsigned long long FIO_decompressFrame(FILE* foutput, FILE* finput,
|
||||
BYTE* inBuff, size_t inBuffSize,
|
||||
BYTE* outBuff, size_t outBuffSize,
|
||||
ZSTD_Dctx* dctx)
|
||||
ZSTD_DCtx* dctx)
|
||||
{
|
||||
BYTE* op = outBuff;
|
||||
BYTE* const oend = outBuff + outBuffSize;
|
||||
@ -433,7 +432,7 @@ unsigned long long FIO_decompressFilename(const char* output_filename, const cha
|
||||
|
||||
|
||||
/* Init */
|
||||
ZSTD_Dctx* dctx = ZSTD_createDCtx();
|
||||
ZSTD_DCtx* dctx = ZSTD_createDCtx();
|
||||
FIO_getFileHandles(&finput, &foutput, input_filename, output_filename);
|
||||
|
||||
/* for each frame */
|
||||
|
@ -49,25 +49,7 @@
|
||||
#include "zstd_static.h"
|
||||
#include "datagen.h" /* RDG_genBuffer */
|
||||
#include "xxhash.h" /* XXH64 */
|
||||
|
||||
|
||||
/**************************************
|
||||
* Basic Types
|
||||
**************************************/
|
||||
#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */
|
||||
# include <stdint.h>
|
||||
typedef uint8_t BYTE;
|
||||
typedef uint16_t U16;
|
||||
typedef uint32_t U32;
|
||||
typedef int32_t S32;
|
||||
typedef uint64_t U64;
|
||||
#else
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short U16;
|
||||
typedef unsigned int U32;
|
||||
typedef signed int S32;
|
||||
typedef unsigned long long U64;
|
||||
#endif
|
||||
#include "mem.h"
|
||||
|
||||
|
||||
/**************************************
|
||||
|
Reference in New Issue
Block a user