using Lua.Runtime; namespace Lua.CodeAnalysis.Compilation { public static class LuaCompiler { /// /// Lua bytecode signature. If the bytes start with this signature, they are considered as Lua bytecode. /// public static ReadOnlySpan LuaByteCodeSignature => Header.LuaSignature; /// /// Converts a Lua bytecode to a Prototype object. /// /// binary bytecode /// chunk name /// public static Prototype UnDump(ReadOnlySpan span, ReadOnlySpan name) => Parser.UnDump(span, name); /// /// Converts a Prototype object to a Lua bytecode. /// /// Prototype object /// true if the bytecode should be in little endian format, false if it should be in big endian format /// binary bytecode public static byte[] Dump(Prototype prototype, bool useLittleEndian = true) => Parser.Dump(prototype, useLittleEndian); } }