From efb4ef5035a0455c1c9c83643db64aea99c7239e Mon Sep 17 00:00:00 2001 From: CPunch Date: Wed, 8 Dec 2021 16:26:29 -0600 Subject: [PATCH] Added some minor context info --- luac.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/luac.py b/luac.py index 1ef4393..d587fcf 100644 --- a/luac.py +++ b/luac.py @@ -1,8 +1,18 @@ +''' + Luac.py + + A Lua5.1 cross-platform bytecode deserializer. This module pulls int and size_t sizes from the + chunk header, meaning it should be able to deserialize lua bytecode dumps from most platforms, + regardless of the host machine. + + For details on the Lua5.1 bytecode format, I read [this PDF](https://archive.org/download/a-no-frills-intro-to-lua-5.1-vm-instructions/a-no-frills-intro-to-lua-5.1-vm-instructions_archive.torrent) + as well as read the lundump.c source file from the Lua5.1 source. +''' + import struct import array from enum import IntEnum, Enum, auto - class InstructionType(Enum): ABC = auto(), ABx = auto(),