Skip to content

unity3d compatible lz4 pack/unpack library working on Python3.

License

Notifications You must be signed in to change notification settings

Axess-kun/lz4unipy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lz4unipy

unity3d compatible lz4 pack/unpack library in Python3.

About

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.

Install

pip3 install lz4unipy

Usage

command line

lz4unipy [pack|unpack] target_file [target dir]

import

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))

Test

git clone [email protected]/Cryptomelone/lz4unipy.git
cd lz4unipy
pip3 install -r requirements.txt
python3 setup.py test

Notice

テスト用ファイル sample.png にはバンダイナムコエンターテインメント株式会社の提供するスマートフォン向けリズムゲーム、アイドルマスターミリオンライブ! シアターデイズのゲーム内スクリーンショットを利用しています。この場を借りてお礼申し上げます。

About

unity3d compatible lz4 pack/unpack library working on Python3.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%