import json
import msgpack
import os

def process_assets():
    with open('paintkits.json', 'r', encoding='utf-8') as f:
        paints = json.load(f)
    with open('paintkits.msgpack', 'wb') as f:
        f.write(msgpack.packb(paints, use_bin_type=True))
    
    with open('en.json', 'r', encoding='utf-8') as f:
        lang_data = json.load(f)
    with open('en.min.json', 'w', encoding='utf-8') as f:
        json.dump(lang_data, f, separators=(',', ':'), ensure_ascii=False)

    print("Assets prepared: paintkits.msgpack and en.min.json")

if __name__ == "__main__":
    process_assets()