Library for data (de)compression using Nintendo's lzss11 algorithm
Project description
nlzss11
Library for data compression using Nintendo's variant of the lzss algorithm
Reference implementation: nlzss
Usage
nlzss11 can be installed with pip3 install nlzss11
.
nlzss11.get_uncompressed_size(data)
Returns the size in bytes of the file if uncompressed or None if the bytes are not a valid Nintendo LZSS 11 compressed file.
nlzss11.decompress(data)
Decompresses nlzss11-compressed data from a bytes-like object data
. Returns a bytes object containing the uncompressed data.
nlzss11.decompress_unsafe(data)
Decompresses nlzss11-compressed data from a bytes (not bytes-like) object data
. Returns a bytes object containing the uncompressed data.
Unlike nlzss11.decompress, this function assumes that the input data is well-formed. In exchange for slightly improved performance, no sanity checks are performed. Warning: Do not use on untrusted data.
nlzss11.compress(data, level=7)
Compresses a bytes-like object data
. Returns a bytes-like object containing the compressed data.
level
is the compression level (6-9). 6 is fastest and 9 is slowest. Higher compression levels result in better compression. 7 is a good compromise between compression ratio and performance.
Project information
This project is a fork from the amazing syaz0 Project, just modified to match the algorithm found in The Legend of Zelda: Skyward Sword.
Building from source
Building nlzss11 from source requires:
- CMake 3.10+
- A compiler that supports C++17
- Everything needed to build zlib-ng
- pybind11 2.4+ (including CMake config files)
- setuptools
When no binary build is available, pip will automatically build from source during the install process.
To build and install from source run pip3 install .
.
Building for manylinux
- Use the manylinux docker container in this directory:
docker run -v $PWD:/home/build/nlzss11 -ti quay.io/pypa/manylinux2010_x86_64 bash
- Run
bash build-on-manylinux.sh
- run
setup.py bdist_wheel
with every cpython version you want from/opt/python
Changelog
1,7
- recompress support for files > 0xFFFFFF (found in SSHD)
1.3
- decompress support for files > 0xFFFFFF (found in SSHD)
License
This software is licensed under the terms of the GNU General Public License, version 2 or later.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file nlzss11-1.8.tar.gz
.
File metadata
- Download URL: nlzss11-1.8.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03710ab4330b25ab2ca8a44bd7fabd1b9d93ba25830f1c404a77c8e3eca1d382 |
|
MD5 | 3d15048865dd2ec886bc248182b8accf |
|
BLAKE2b-256 | fb2d24a95afedc4111c8b7734539053091e493db4eb0bdeb07388c0ab4e201d6 |
File details
Details for the file nlzss11-1.8-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 143.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae8348d6828781d75657ca4550fcc5dc0fe6dafbdefa51fccca2bdca247d0f3 |
|
MD5 | 53cdcfab36a15c75e4ee71d5d04a7bba |
|
BLAKE2b-256 | d2bba352c4e75b33ae6fb323cb52d398f045f609c194348ce70ce7ef1daefe2e |
File details
Details for the file nlzss11-1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 181.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a58d70ab923c29343055f33a2b0961a3f481597793bd6b91b46f95d121470a8 |
|
MD5 | f71ede4a81ee0b5fcd7db2940adcb397 |
|
BLAKE2b-256 | 10931d8e8dddcba278a035a98bb66b303554a4a48dcf75c357af68268c059a46 |
File details
Details for the file nlzss11-1.8-cp313-cp313-macosx_10_14_universal2.whl
.
File metadata
- Download URL: nlzss11-1.8-cp313-cp313-macosx_10_14_universal2.whl
- Upload date:
- Size: 146.8 kB
- Tags: CPython 3.13, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8d5b082493f27b3b235e70a217d27075c16a0b06cabcd1af455d93f3ee310f8 |
|
MD5 | 8a30d495c714008e2f1d59c046b8d584 |
|
BLAKE2b-256 | 082c2803d39d2a8927b55ab451fb9732f88efe02d879ed0d9525d4e2de7036ec |
File details
Details for the file nlzss11-1.8-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 143.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bbc8a25c2d29c6f1a42e0ef78c623db84dd7f0c39122f94e74a8765d2c43930 |
|
MD5 | ccf89978d543fee8af65164ea5981e17 |
|
BLAKE2b-256 | 3c8641756647d1bdf07af1b777aaaaca3a255d7c80c9749e38462e9c26754ef3 |
File details
Details for the file nlzss11-1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 181.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00cb61f14fdb07b55601164bb34c3333dd4725cd926cedf263888e26986b2406 |
|
MD5 | f2ab50efcb2091d4a06151824c260fa9 |
|
BLAKE2b-256 | d52f50ef7066464edc0e9b7de28732146a209fa1faf1e00f040f267cd80d4410 |
File details
Details for the file nlzss11-1.8-cp312-cp312-macosx_10_14_universal2.whl
.
File metadata
- Download URL: nlzss11-1.8-cp312-cp312-macosx_10_14_universal2.whl
- Upload date:
- Size: 146.7 kB
- Tags: CPython 3.12, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 023053f4b3151e963db62f344b39e0d3e0575df83342c45e016dd0fe82b5188b |
|
MD5 | 550394177c7f782da932522c3ad200f2 |
|
BLAKE2b-256 | c032cc65faeb10ae2f139ca61eeedd364a94264b7629579e95aae9b9bdb8304f |
File details
Details for the file nlzss11-1.8-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 142.5 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f3c7f7de2ff67c67051a34b6c763bbf315c586a16a4f4d5cf3d6c52e5e30cac |
|
MD5 | a269bb6bb13a92d340c30f9ae5c0d023 |
|
BLAKE2b-256 | 4bd3e4010b05d531654abb8186488fe118384b02f6668794e557f30a8d18adaa |
File details
Details for the file nlzss11-1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 181.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c6c0e0c4dc91763cffd60cc670bc82761726bdfd72d452d30a40c492643ab32 |
|
MD5 | 9a13e8ae0735fda10710bdfc18b0ad04 |
|
BLAKE2b-256 | eed3bc925e5cedfbd5cbff111b61ae1be343a0556c5a919f72b64aa4ae97902d |
File details
Details for the file nlzss11-1.8-cp311-cp311-macosx_10_14_universal2.whl
.
File metadata
- Download URL: nlzss11-1.8-cp311-cp311-macosx_10_14_universal2.whl
- Upload date:
- Size: 144.9 kB
- Tags: CPython 3.11, macOS 10.14+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95df1a2f990f92c691301160d3344022ea79117e9fa61dfeb3a33f52adb22b0e |
|
MD5 | 28afe91673763671fa2488dd5d125935 |
|
BLAKE2b-256 | e923881a42c31e0d28e9bbfef064068bda519c6f25713601462b4c403fb1b125 |
File details
Details for the file nlzss11-1.8-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 142.4 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43925a17fa3f14131e71e86f86881d36fefb731719aedc5a6ac1eafb976c5471 |
|
MD5 | a4e6454cbe61373228cd1bdd0ead06dd |
|
BLAKE2b-256 | 913c02dd4a2141e7ddb4d8836e7a81bace0b3dac46b3e66e46abc4b9d9b4cf87 |
File details
Details for the file nlzss11-1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 181.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76792e1df86a2e5c8ec188cea1655c68ca554219dde581d86a336af5fdc119ba |
|
MD5 | bf818a966470c7e89aeb1b5e7eed1f3d |
|
BLAKE2b-256 | ee0422ce6963e3eb8933c3d545813e4f4927eaf062de772fd525cda9bc927b57 |
File details
Details for the file nlzss11-1.8-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 144.9 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4a51a010937588567d6d99c2c636281ab99dcc2005d9534fd23fb68557ea788 |
|
MD5 | 700181a7450069c53294732b395fa208 |
|
BLAKE2b-256 | 98d0abb162331cdfeab71d7a0d2253dd0ea02d65eac4268426b4a799fdb31f39 |
File details
Details for the file nlzss11-1.8-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 140.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34fe350f9ad9ca5f6d3b24c4efc2cff75f67594d900ebd43ceca14bb763f3d6a |
|
MD5 | 4ad7b3993a631261685512903e80e801 |
|
BLAKE2b-256 | cb1ad799971656da07babe49f801a0b5bc16c2002e9a0fe083ca890bfae17a21 |
File details
Details for the file nlzss11-1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 182.0 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ca1033f876d63594a8b6647be34f9065848107b5f7998cd9480916ddf55b25 |
|
MD5 | 6cb2d5c3aba620949de88ed0f9ca880c |
|
BLAKE2b-256 | cdc7e4dd7baa90fcedad4b3a48abac16710aed8885a9f6f6f5ee9c52bba885ba |
File details
Details for the file nlzss11-1.8-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 144.9 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfab269da4826e994e67da90978ccb17bb8fc6ba4c237557d0842091e47352ee |
|
MD5 | 10335d86c896f6ba178f0ada55ad6173 |
|
BLAKE2b-256 | 9e7d602a9a5b2f443ee7dd8cd8aa325309701a5411f6c01c9a5a12b5ebb0bad9 |
File details
Details for the file nlzss11-1.8-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 142.4 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36d209d79eeab670732b37ff86a44a7d37d37d4e6991f1d6ba1624522a5c2f51 |
|
MD5 | a70fec47ff263b6bee56e176c4c4eefa |
|
BLAKE2b-256 | b7003354c74a3ae06c5bd98d190a2ce6efd89a5132f883711d4422a2f8237271 |
File details
Details for the file nlzss11-1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 181.2 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2cc945cc02fcc35817ae878c270fce76d4540ea6d3f897e16c7e4aa8834ef5 |
|
MD5 | 7b67677591712718046018b78e920ad8 |
|
BLAKE2b-256 | 53f4e38bd60b75c0bb813bf05a64104a0e7bccd9ff58712c27270644e7e4954a |
File details
Details for the file nlzss11-1.8-cp38-cp38-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp38-cp38-macosx_11_0_x86_64.whl
- Upload date:
- Size: 144.8 kB
- Tags: CPython 3.8, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbccd7d8e05a0531f62dc2b76d63e545f77977200f27bf058d2a3ec594bf6b00 |
|
MD5 | 0b80ca8aaf673c81c2f5afd5bc078b92 |
|
BLAKE2b-256 | 9352fe6eb7e07ea745c7bf9a93222fd4f070919cc3146627ff63071af43fe3ab |
File details
Details for the file nlzss11-1.8-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 142.9 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b22793a63345f1b003a4afcf17289a2dbafb6fa346e74452bceec773f56417e1 |
|
MD5 | de3c7f189e1425e94439bd4fcf477fa2 |
|
BLAKE2b-256 | 4d60f2f6e1351a4b58e35bef8a1e16fc86f6abefbb817d49388f92b056c97503 |
File details
Details for the file nlzss11-1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 186.2 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4398904dbaeff2b99d0001f1d16664b0ee3ad98145f00fc23e8c68a1e3617d91 |
|
MD5 | 38e2b95d1acadb0b20d8126d146a38f0 |
|
BLAKE2b-256 | 1114ff51367f04756dce6f1214758d42d7fcc42f595e771b27a58ff5599845c4 |
File details
Details for the file nlzss11-1.8-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 142.8 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e6193de1a0a08bad72a864c694084809691ac78d05cbd1857a5fd8c4af1186 |
|
MD5 | 7d315a1a74913f01e707c3462644537f |
|
BLAKE2b-256 | 6e845aa610abe3477b3db6e08bd184fb9584f128a7b9d4aead8dbae34662ed00 |
File details
Details for the file nlzss11-1.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nlzss11-1.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 186.1 kB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7c6b6213b0a880677d9bab568df6046968c29ccb90aea1c3067a2511328574 |
|
MD5 | 3fb7fd740259f264978f56f50450db9b |
|
BLAKE2b-256 | 2de37fd5a49c9de49c2ac04358dec33475ad12b0543ad0bb1fd2f08e9073a98b |