Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lua Application Programming Helper Libraries

branch: master
Octocat-spinner-32 docs new file: ../ColorsHollasch.lua January 17, 2013
Octocat-spinner-32 tests modified: MemoryStream.lua April 03, 2013
Octocat-spinner-32 BinaryStream.lua new file: TLS.lua January 15, 2013
Octocat-spinner-32 BitBang.lua new file: c99_types.lua January 02, 2013
Octocat-spinner-32 CRC32.lua modified: CRC32.lua December 29, 2012
Octocat-spinner-32 CVec.lua Changes to stream:ReadLine() September 25, 2012
Octocat-spinner-32 ColorSpace.lua new file: TLS.lua January 15, 2013
Octocat-spinner-32 ColorsHollasch.lua modified: ConvertHollasch.lua January 19, 2013
Octocat-spinner-32 ColorsResene.lua new file: ../ColorsHollasch.lua January 17, 2013
Octocat-spinner-32 ColorsSGI.lua new file: ../ColorsHollasch.lua January 17, 2013
Octocat-spinner-32 FileStream.lua Added GetLength() to streams interface June 12, 2012
Octocat-spinner-32 Hashes.lua Added CVec September 01, 2012
Octocat-spinner-32 LICENSE.txt modified: LICENSE.txt April 03, 2013
Octocat-spinner-32 LuaState.lua deleted: ../ColorsHollasch.lua February 12, 2013
Octocat-spinner-32 MD5.lua Fixed strcpy June 01, 2012
Octocat-spinner-32 MemoryStream.lua modified: MemoryStream.lua April 03, 2013
Octocat-spinner-32 Pixel.lua new file: TLS.lua January 15, 2013
Octocat-spinner-32 README.md modified: MemoryStream.lua April 03, 2013
Octocat-spinner-32 TLS.lua modified: TLS.lua January 15, 2013
Octocat-spinner-32 Vector.lua new file: c99_types.lua January 02, 2013
Octocat-spinner-32 aestable.lua new file: ../ColorsHollasch.lua January 17, 2013
Octocat-spinner-32 ascii.lua Added bintohex and hextobin to stringzutils May 29, 2012
Octocat-spinner-32 bencode.lua Changes to MemoryStream July 28, 2012
Octocat-spinner-32 c99_types.lua modified: ../c99_types.lua January 03, 2013
Octocat-spinner-32 cctype.lua new file: c99_types.lua January 02, 2013
Octocat-spinner-32 ffi_stack.lua Changes to MemoryStream July 28, 2012
Octocat-spinner-32 httpheaders.lua Added httpheaders.lua June 16, 2012
Octocat-spinner-32 limits.lua Added ascii.lua to handle tokens for ASCII May 17, 2012
Octocat-spinner-32 lua_ffi.lua modified: LICENSE.txt April 03, 2013
Octocat-spinner-32 luxl.lua modified: MemoryStream.lua April 03, 2013
Octocat-spinner-32 maths.lua new file: TLS.lua January 15, 2013
Octocat-spinner-32 memutils.lua new file: c99_types.lua January 02, 2013
Octocat-spinner-32 mime.lua modified: ColorsHollasch.lua January 18, 2013
Octocat-spinner-32 mimetypes.lua Added mime utilities August 29, 2012
Octocat-spinner-32 printutils.lua new file: TLS.lua January 15, 2013
Octocat-spinner-32 sha2.lua new file: ../ColorsHollasch.lua January 17, 2013
Octocat-spinner-32 stdc.lua new file: c99_types.lua January 02, 2013
Octocat-spinner-32 stream.lua Changes to stream:ReadLine() September 25, 2012
Octocat-spinner-32 stringutils.lua new file: ../SGIColors.lua January 05, 2013
Octocat-spinner-32 stringzutils.lua Faster more compact CRC32 July 17, 2012
Octocat-spinner-32 strtoul.lua Added luxl - LUa Xml Lexer June 02, 2012
Octocat-spinner-32 utf.lua Combined utf-8 and utf-16 into utf file June 21, 2012
README.md

LAPHLibs

Lua Application Programming Helper Libraries

This is a repository of things I have found to be useful while programming in LuaJIT.

In most cases, the routines use features that are very specific to the LuaJIT variant of Lua. In particular, the LuaJIT FFI feature is heavily used. This gives many of the routines a fairly familiar 'C' look and feel, but they take on some of the better characteristics of Lua, namely memory management.

This set of functions is constantly evolving as LuaJIT itself improves, as well as my own knowledge of how best to use it.

Current: Works against LUAJIT git HEAD as of 25/09/2012

ascii.lua

This file contains a table of the ASCII character set, with numeric values and descriptions. There are routines to create constant values from the table.

bencode.lua

Implementation of the bencode format, which is used to encode/decode torrent files.

BinaryStream.lua

A 'class' that can deal with reading and writing of binary values from/to a stream. You can configure the stream to deal with a big or little endian source.

BitBang.lua

Lowest level bit twiddling. Builds upon the bitops allowing the getting/setting of bit values within a larger array of values.

c99_types.lua

Helper support for types typically found in stdint.h

cctype.lua

Implementation of the isxxx() character classification functions typically found in the libc libraries. These routines operate on numbers, and return boolean values.

CRC32.lua

Implementation of a CRC32 routine

httpheaders.lua

A simple Lua table containing HTTP headers. The table contains information as to whether the header is used for requests, responses, or both. This simple table can be used directly, or turned into another form, depending on your requirements.

limits.lua

Values for various limits on numeric values

LUXL.lua

Implementation of very low level XML lexer/parser. This is not a conformant validating XML parser, but it's enough to get the job done on typical .xml configuration files, and many data streams.

This implementation does no memory allocations. It returns pointers and sizes as a result of the lexing activities.

MD5.lua

Implementation of the MD5 hash algorithm

MemoryStream.lua

Implementation of a streaming interface over a chunk of memory

memutils.lua

contains several routines that have C equivalents, such as memset, memcpy, memcmp, memchr, memmove. Also contains a few convenience functions related to dealing with chunks of memory.

mime.lua

Contains a table and function that maps between a file extension and the appropriate mime type.

mimetypes.lua

A simple Lua table which contains mime type information.

stringzutils.lua

Contains a set of functions that deal with null terminated strings. All the typical security hole opening functions such as strcpy, strcmp are there, as well as their marginally more secure counterparts such as strlcpy, and strlcat.

strtoul.lua

Turns a string value into a number value. Operates on a pointer to a string value, so it does not require the source to be a Lua String.

Something went wrong with that request. Please try again.