Skip to main content
Copyright (c) 2017 CrescentApricot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: # lz4unipy

## 概要

`lz4unipy` は `unity-lz4` 互換の展開/圧縮を行うコマンドラインツールと簡易なライブラリです。

## インストール

```bash
pip3 install lz4unipy
```

## 使い方

### コマンドライン

```bash
lz4unipy [-h] [--dir DIR] infile [infile ...]
```

指定したファイルより自動的に動作モードを、パスより自動的に出力ファイル名を決定します。

### ライブラリ

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

## テスト

```bash
git clone git@github.com/CrescentApricot/lz4unipy.git
cd lz4unipy
python3 setup.py test
```

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

Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: System :: Archiving :: Compression
Classifier: Topic :: Software Development :: Libraries :: Python Modules

Metadata

Release files for lz4unipy 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lz4unipy 2.0.1
File Size Uploaded
lz4unipy-2.0.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lz4unipy 2.0.1
File Interpreter ABI Platform
lz4unipy-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / lz4unipy-2.0.1.tar.gz

Download URL lz4unipy-2.0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b2768a2eba7fd20b9ca051d1baf6594d22fcfb2610e5d385bc69e94c99be9724
BLAKE2b-256 checksum
How to use checksums
f8658c9a612edf9d0dcd478f19ca844fa9babd6a1cee05a5aac2bd2ea3964d35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.1

Release files / lz4unipy-2.0.1-py3-none-any.whl

Download URL lz4unipy-2.0.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e70e1b5ff3dd727beeefbdd74a2c66b2896ccb9e4d442205d252a87de3aee8ea
BLAKE2b-256 checksum
How to use checksums
9187fca5639998f47484d77ba81dc79bb8124305b0e5c3ebc6d4853996e80a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.1

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page