Skip to content
forked from you0708/lznt1

Python implementation of LZNT1 compression/decompression

License

Notifications You must be signed in to change notification settings

evolution536/lznt1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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\ln>python test.py lznt1.py
[*] input size = 4067 bytes, sha1 hash = 9887522d4088152ca434a5f275adcd99c2de338d
[*] size of compressed1: 1280
[*] size of compressed2: 1553
[*] sha1 hash of compressed1: 64b9b5f92274e60d10f3ef0e517f563cc8d46bd6
[*] sha1 hash of compressed2: 92e737ee1d2b468800169cc7b28854b392ac8395
[*] sha1 hash of decompressed11: 9887522d4088152ca434a5f275adcd99c2de338d
[*] sha1 hash of decompressed12: 9887522d4088152ca434a5f275adcd99c2de338d
[*] sha1 hash of decompressed21: 9887522d4088152ca434a5f275adcd99c2de338d
[*] sha1 hash of decompressed22: 9887522d4088152ca434a5f275adcd99c2de338d

References

License

Apache License 2.0. See LICENSE.

About

Python implementation of LZNT1 compression/decompression

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%