mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
Merge pull request #306 from david-y-lam/fix_doc
Cleanup some errors in typedef comments and remove duplicated HOWTO f…
This commit is contained in:
commit
309f113028
@ -7,6 +7,14 @@
|
|||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* ***************************************************************
|
||||||
|
* NOTES/WARNINGS
|
||||||
|
*****************************************************************/
|
||||||
|
/* The streaming API defined here will soon be deprecated by the
|
||||||
|
* new one in 'zstd.h'; consider migrating towards newer streaming
|
||||||
|
* API. See 'lib/README.md'.
|
||||||
|
*****************************************************************/
|
||||||
|
|
||||||
#ifndef ZSTD_BUFFERED_H_23987
|
#ifndef ZSTD_BUFFERED_H_23987
|
||||||
#define ZSTD_BUFFERED_H_23987
|
#define ZSTD_BUFFERED_H_23987
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxS
|
|||||||
struct HUF_CElt_s {
|
struct HUF_CElt_s {
|
||||||
U16 val;
|
U16 val;
|
||||||
BYTE nbBits;
|
BYTE nbBits;
|
||||||
}; /* typedef'd to HUF_CElt within huf_static.h */
|
}; /* typedef'd to HUF_CElt within "huf.h" */
|
||||||
|
|
||||||
typedef struct nodeElt_s {
|
typedef struct nodeElt_s {
|
||||||
U32 count;
|
U32 count;
|
||||||
|
@ -77,7 +77,7 @@ struct ZBUFF_CCtx_s {
|
|||||||
U32 checksum;
|
U32 checksum;
|
||||||
U32 frameEnded;
|
U32 frameEnded;
|
||||||
ZSTD_customMem customMem;
|
ZSTD_customMem customMem;
|
||||||
}; /* typedef'd tp ZBUFF_CCtx within "zstd_buffered.h" */
|
}; /* typedef'd tp ZBUFF_CCtx within "zbuff.h" */
|
||||||
|
|
||||||
ZBUFF_CCtx* ZBUFF_createCCtx(void)
|
ZBUFF_CCtx* ZBUFF_createCCtx(void)
|
||||||
{
|
{
|
||||||
|
@ -2672,7 +2672,7 @@ struct ZSTD_CDict_s {
|
|||||||
void* dictContent;
|
void* dictContent;
|
||||||
size_t dictContentSize;
|
size_t dictContentSize;
|
||||||
ZSTD_CCtx* refContext;
|
ZSTD_CCtx* refContext;
|
||||||
}; /* typedef'd tp ZSTD_CDict within zstd.h */
|
}; /* typedef'd tp ZSTD_CDict within "zstd.h" */
|
||||||
|
|
||||||
ZSTD_CDict* ZSTD_createCDict_advanced(const void* dict, size_t dictSize, ZSTD_parameters params, ZSTD_customMem customMem)
|
ZSTD_CDict* ZSTD_createCDict_advanced(const void* dict, size_t dictSize, ZSTD_parameters params, ZSTD_customMem customMem)
|
||||||
{
|
{
|
||||||
|
@ -19,30 +19,6 @@
|
|||||||
#include "zbuff.h"
|
#include "zbuff.h"
|
||||||
|
|
||||||
|
|
||||||
/*-***************************************************************************
|
|
||||||
* Streaming decompression howto
|
|
||||||
*
|
|
||||||
* A ZBUFF_DCtx object is required to track streaming operations.
|
|
||||||
* Use ZBUFF_createDCtx() and ZBUFF_freeDCtx() to create/release resources.
|
|
||||||
* Use ZBUFF_decompressInit() to start a new decompression operation,
|
|
||||||
* or ZBUFF_decompressInitDictionary() if decompression requires a dictionary.
|
|
||||||
* Note that ZBUFF_DCtx objects can be re-init multiple times.
|
|
||||||
*
|
|
||||||
* Use ZBUFF_decompressContinue() repetitively to consume your input.
|
|
||||||
* *srcSizePtr and *dstCapacityPtr can be any size.
|
|
||||||
* The function will report how many bytes were read or written by modifying *srcSizePtr and *dstCapacityPtr.
|
|
||||||
* Note that it may not consume the entire input, in which case it's up to the caller to present remaining input again.
|
|
||||||
* The content of @dst will be overwritten (up to *dstCapacityPtr) at each function call, so save its content if it matters, or change @dst.
|
|
||||||
* @return : a hint to preferred nb of bytes to use as input for next function call (it's only a hint, to help latency),
|
|
||||||
* or 0 when a frame is completely decoded,
|
|
||||||
* or an error code, which can be tested using ZBUFF_isError().
|
|
||||||
*
|
|
||||||
* Hint : recommended buffer sizes (not compulsory) : ZBUFF_recommendedDInSize() and ZBUFF_recommendedDOutSize()
|
|
||||||
* output : ZBUFF_recommendedDOutSize==128 KB block size is the internal unit, it ensures it's always possible to write a full block when decoded.
|
|
||||||
* input : ZBUFF_recommendedDInSize == 128KB + 3;
|
|
||||||
* just follow indications from ZBUFF_decompressContinue() to minimize latency. It should always be <= 128 KB + 3 .
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
typedef enum { ZBUFFds_init, ZBUFFds_loadHeader,
|
typedef enum { ZBUFFds_init, ZBUFFds_loadHeader,
|
||||||
ZBUFFds_read, ZBUFFds_load, ZBUFFds_flush } ZBUFF_dStage;
|
ZBUFFds_read, ZBUFFds_load, ZBUFFds_flush } ZBUFF_dStage;
|
||||||
|
|
||||||
@ -62,7 +38,7 @@ struct ZBUFF_DCtx_s {
|
|||||||
BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX];
|
BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX];
|
||||||
size_t lhSize;
|
size_t lhSize;
|
||||||
ZSTD_customMem customMem;
|
ZSTD_customMem customMem;
|
||||||
}; /* typedef'd to ZBUFF_DCtx within "zstd_buffered.h" */
|
}; /* typedef'd to ZBUFF_DCtx within "zbuff.h" */
|
||||||
|
|
||||||
|
|
||||||
ZBUFF_DCtx* ZBUFF_createDCtx(void)
|
ZBUFF_DCtx* ZBUFF_createDCtx(void)
|
||||||
|
@ -124,7 +124,7 @@ struct ZSTD_DCtx_s
|
|||||||
size_t rleSize;
|
size_t rleSize;
|
||||||
BYTE litBuffer[ZSTD_BLOCKSIZE_ABSOLUTEMAX + WILDCOPY_OVERLENGTH];
|
BYTE litBuffer[ZSTD_BLOCKSIZE_ABSOLUTEMAX + WILDCOPY_OVERLENGTH];
|
||||||
BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX];
|
BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX];
|
||||||
}; /* typedef'd to ZSTD_DCtx within "zstd_static.h" */
|
}; /* typedef'd to ZSTD_DCtx within "zstd.h" */
|
||||||
|
|
||||||
size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx) { return sizeof(*dctx); }
|
size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx) { return sizeof(*dctx); }
|
||||||
|
|
||||||
@ -1219,7 +1219,7 @@ struct ZSTD_DDict_s {
|
|||||||
void* dict;
|
void* dict;
|
||||||
size_t dictSize;
|
size_t dictSize;
|
||||||
ZSTD_DCtx* refContext;
|
ZSTD_DCtx* refContext;
|
||||||
}; /* typedef'd tp ZSTD_CDict within zstd.h */
|
}; /* typedef'd to ZSTD_DDict within "zstd.h" */
|
||||||
|
|
||||||
ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, ZSTD_customMem customMem)
|
ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, ZSTD_customMem customMem)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user