unity3d compatible lz4 pack/unpack library in Python3.
lz4unipy is unity3d compatible lz4 pack/unpack library working on Python3.
It contains functions and simple command line tools for make/pack unity3d compatibled lz4 file.
pip3 install lz4unipy
lz4unipy [pack|unpack] target_file [target dir]
import lz4unipy
with open("target_file.unity3d.lz4", "rb") as f:
data = f.read()
if lz4unipy.is_compressed(data):
with open("target_file.unity3d", "wb") as w:
w.write(lz4unipy.decompress(data))
with open("target_file.unity3d", "rb") as f:
data = f.read()
if not lz4unipy.is_compressed(data):
with open("target_file.unity3d.lz4", "wb") as w:
w.write(lz4unipy.compress(data))
git clone [email protected]/Cryptomelone/lz4unipy.git
cd lz4unipy
pip3 install -r requirements.txt
python3 setup.py test
テスト用ファイル sample.png にはバンダイナムコエンターテインメント株式会社の提供するスマートフォン向けリズムゲーム、アイドルマスターミリオンライブ! シアターデイズのゲーム内スクリーンショットを利用しています。この場を借りてお礼申し上げます。