Skip to content

Instantly share code, notes, and snippets.

import sys
import argparse
def vlc_lzw_compress(data, nbit=8):
assert 1 < nbit < 9, 'nbit must satisfies, 1 < nbit < 9'
# LZW encoding
CLR = 1<<nbit
END = CLR+1
d = {}
00 always 1 int
01 テクスチャのindex
02 色の量子化の種類 byte
03 luma chroma both (or bloom on off) byte
04 enable delay
05 delay int
06 回転 ofs
07 テクスチャ繰り返し ofs

About this document

This document is WIP.

This document gives you a techinial overview about Ninja Gaiden Sigma 2 (Ninja gaiden Master Collection PC)'s savedata.

You should be familiar with some programming language (C, C++, Java).

This document is written by Nozomi Miyamori and is in the Public Domain.

import math
import mmap
import sys
# Author: Nozomi Miyamori
# This program is in the Public Domain.
test_quan_table = [2, 1, 1, 1, 1, 0, 0, 0]
test_rate_table = [50, 40, 5, 4, 1, 0, 0, 0]
@nm004
nm004 / strtohex.py
Last active September 23, 2023 17:43
#
# strtohex - Read hex values in string representaion from command line and write them
# in byte representation out to stdout
#
# This software is in the public domain
#
import os, sys
os.write(1, b''.join( bytes.fromhex(s) for s in sys.argv[1:] ))
/*
* autoholdclick - auto clicking while holding a button (for Linux only).
*
* Build:
* cc -o autoholdclick autoholdclick.c $(pkg-config --cflags --libs libevdev)
*
* This software is in the public domain.
*/
#include <libevdev/libevdev-uinput.h>