You Nakatsuru 8ac366bb34 Python3 support
2020-03-17 00:50:31 +09:00
2018-05-01 14:44:30 +09:00
2020-03-17 00:50:31 +09:00
2020-03-17 00:50:31 +09:00
2020-03-17 00:50:31 +09:00
2018-05-07 23:23:42 +09:00

LZNT1

Python implementation of LZNT1 compression/decompression.

Note that the compression algorithm is not perfect, but compressed data can be decompressed by RtlDecompressBuffer.

How to use

Install

pip install lznt1

Compress / decompress

>>> import lznt1
>>> compressed = lznt1.compress(data)
>>> decompressed = lznt1.decompress(compressed)

Test

C:\Users\you\Desktop>python test.py lznt1.py
[*] input size = 4034 bytes, sha1 hash = e19250d48c1e46d7d0fa46a5d345487d723559cd
[*] size of compressed1: 1264
[*] size of compressed2: 1559
[*] sha1 hash of compressed1: 720bd5775ee3273deaebabb29a412ea079fa79ae
[*] sha1 hash of compressed2: 8df2fe59dba7fa4d4d01a8f12f05d7b5799238cc
[*] sha1 hash of decompressed11: e19250d48c1e46d7d0fa46a5d345487d723559cd
[*] sha1 hash of decompressed12: e19250d48c1e46d7d0fa46a5d345487d723559cd
[*] sha1 hash of decompressed21: e19250d48c1e46d7d0fa46a5d345487d723559cd
[*] sha1 hash of decompressed22: e19250d48c1e46d7d0fa46a5d345487d723559cd

References

License

Apache License 2.0. See LICENSE.

S
Description
Automated archival mirror of github.com/you0708/lznt1
Readme Apache-2.0 35 KiB
Languages
Python 100%