Skip to content

Commit

Permalink
Update Lizard - use internal HUF and FSE entropy
Browse files Browse the repository at this point in the history
- AdjustLiz.sh fixes some double defines with zstd of lizard
- lizard uses it's own entropy lib again
- this will fix #302

Signed-off-by: Tino Reichardt <milky-7zip@mcmilk.de>
  • Loading branch information
mcmilk committed Feb 27, 2023
1 parent 36c2a9c commit b2d7bd3
Show file tree
Hide file tree
Showing 29 changed files with 6,133 additions and 46 deletions.
6 changes: 3 additions & 3 deletions C/7zVersion.h
@@ -1,7 +1,7 @@
#define MY_VER_MAJOR 22
#define MY_VER_MINOR 01
#define MY_VER_BUILD 03
#define MY_VERSION_NUMBERS "22.01 ZS v1.5.4 R3"
#define MY_VER_BUILD 04
#define MY_VERSION_NUMBERS "22.01 ZS v1.5.4 R4"
#define MY_VERSION MY_VERSION_NUMBERS

#ifdef MY_CPU_NAME
Expand All @@ -10,7 +10,7 @@
#define MY_VERSION_CPU MY_VERSION
#endif

#define MY_DATE "2023-02-21"
#define MY_DATE "2023-02-27"
#undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov, Tino Reichardt"
Expand Down
36 changes: 36 additions & 0 deletions C/lizard/AdjustLiz.sh
@@ -0,0 +1,36 @@
#!/bin/bash
# /TR 2023-02-24

function repl() {
#sed -e "s|LIZ_||g" -i *.c *.h
sed -e "s|$1|LIZ_${1}|g" -i *.c *.h
}

repl HUF_readStats
repl HUF_getErrorName
repl HUF_isError

repl FSE_readNCount
repl FSE_getErrorName
repl FSE_isError
repl FSE_versionNumber

repl FSE_compressBound
repl FSE_compress_usingCTable
repl FSE_buildCTable_rle
repl FSE_normalizeCount
repl FSE_optimalTableLog
repl FSE_writeNCount
repl FSE_NCountWriteBound
repl FSE_buildCTable_wksp

repl HUF_optimalTableLog
repl HUF_compress4X_usingCTable
repl HUF_compress1X_usingCTable
repl HUF_compressBound already
repl HUF_buildCTable_wksp
repl HUF_readCTable

repl HUF_decompress4X_usingDTable
repl HUF_decompress1X_usingDTable
repl HUF_selectDecoder
38 changes: 38 additions & 0 deletions C/lizard/ENTROPY.md
@@ -0,0 +1,38 @@
New Generation Entropy library
==============================

The __lib__ directory contains several files, but you don't necessarily want them all.
Here is a detailed list, to help you decide which one you need :


#### Compulsory files

These files are required in all circumstances :
- __error_public.h__ : error list as enum
- __error_private.h__ : error management
- __mem.h__ : low level memory access routines
- __bitstream.h__ : generic read/write bitstream common to all entropy codecs
- __entropy_common.c__ : common functions needed for both compression and decompression


#### Finite State Entropy

This is the base codec required by other ones.
It implements a tANS variant, similar to arithmetic in compression performance, but much faster. Compression and decompression can be compiled independently.
- __fse.h__ : exposes interfaces
- __fse_compress.c__ : implements compression codec
- __fse_decompress.c__ : implements decompression codec


#### FSE 16-bits symbols version

This codec is able to encode alphabets of size > 256, using 2 bytes per symbol. It requires the base FSE codec to compile properly. Compression and decompression are merged in the same file.
- __fseU16.c__ implements the codec, while __fseU16.h__ exposes its interfaces.


#### Huffman codec

This is the fast huffman codec. It requires the base FSE codec to compress its headers. Compression and decompression can be compiled independently.
- __huf.h__ : exposes interfaces.
- __huf_compress.c__ : implements compression codec
- __huf_decompress.c__ : implements decompression codec

0 comments on commit b2d7bd3

Please sign in to comment.