Skip to content

Commit

Permalink
Adapt Lizard to Zstandard v1.5.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Feb 14, 2023
1 parent 838ba69 commit 7152ed2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ThirdParty/Lizard/lizard_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
#include "lizard_compress_lz4.h"
#include <common/huf.h>

#define HUF_WORKSPACE_SIZE_U32 (HUF_WORKSPACE_SIZE / 4)
static inline size_t HUF_compress(void* dst, size_t dstSize, const void* src, size_t srcSize)
{
unsigned workSpace[HUF_WORKSPACE_SIZE_U32];
return HUF_compress1X_repeat(dst, dstSize, src, srcSize,
HUF_SYMBOLVALUE_MAX, HUF_TABLELOG_DEFAULT,
workSpace, sizeof(workSpace),
NULL, NULL, 0);
}

/* *************************************
* Local Macros
Expand Down
4 changes: 4 additions & 0 deletions ThirdParty/Lizard/lizard_decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ typedef enum { full = 0, partial = 1 } earlyEnd_directive;
#endif
#include <common/huf.h>

static inline size_t HUF_decompress(void* dst, size_t maxDstSize, const void* src, size_t srcSize)
{
return HUF_decompress1X_usingDTable(dst, maxDstSize, src, srcSize, NULL, 0);
}

/*-*****************************
* Decompression functions
Expand Down

0 comments on commit 7152ed2

Please sign in to comment.