- Notifications
You must be signed in to change notification settings - Fork0
LZW-based lightweight encoder/decoder
License
Mototroller/ax.lzw
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Header-only librarylzw.hpp contains implementation of originalLZW compression/decompression algorithms.
Features:
Input
andPacking
dictionaries are fully customizable by symbol ranges, can be piecewise.Predefined:
BINARY_256_common
,ASCII_128_common
,UTF16_pack
(output),URI_pack
(output). Seelzw.hpp tail for definitions examples.Specific codec can be instantiated from template:
lzw_codec<InputDict, PackDict>
.Predefined:
string_to_string
,binary_to_binary
,string_to_UTF16
,string_to_URI
. Seelzw.hpp tail for definitions examples.Encoding with fixed bit depth (choses by maximum used code).
Dense bit packing (library uses as many bits as possible).
Header-only and STL-only open source.
STL-compatible codec interface: same as
std::copy(first, last, d_first)
.Tests with usage examples and simple performance measurements are included.
RELEASE
typical performance:encode = ~200 us/Ksymbol
decode = ~30 us/Ksymbol
zip_ratio < ~0.3 (dst.length/src.length)
Library initially was designed as native LZW extension to be used withWASM andEmscripten Embind.
To be continued