blob: 8c5e4321312d83d1566289b30fe4837d2c96cc63 [file] [log] [blame]
James Kuszmaul8e62b022022-03-22 09:33:25 -07001local m = {}
2local ok, bit = pcall(require, "bit32")
3assert(ok, "The Bit32 library must be installed")
4assert(pcall(require, "compat53"), "The Compat 5.3 library must be installed")
5
6m.GetAlignSize = function(k, size)
7 return bit.band(bit.bnot(k) + 1,(size - 1))
8end
9
10if not table.unpack then
11 table.unpack = unpack
12end
13
14if not table.pack then
15 table.pack = pack
16end
17
18m.string_pack = string.pack
19m.string_unpack = string.unpack
20
21return m