Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 21, 2015
  1. move vstruct/* to ./

    committed with
    This structure was originally requested by the LuaDist team, but it
    makes things harder for everyone else because you can no longer just
    clone vstruct into your lua_path and require it.
    Since (a) LuaDist can wrap this project in a subdir more easily than
    other users can unwrap it and (b) the LuaDist project is dead anyways,
    I'm undoing this.
  2. Remove old IML file

    committed with
Commits on Feb 6, 2015
  1. Use table.concat rather than .. in cursor.lua

    committed with
    This results in a *dramatic* speed improvement when writing large arrays
    to strings, which was previously shockingly slow and stressed the gc
    quite heavily.
Commits on Jan 27, 2015
Commits on Jul 12, 2014
  1. Add vstruct.array() function

Commits on Jul 11, 2014
Commits on May 5, 2014
  1. Implement "compat1x" module

  2. Merge pull request #24 from edwardrf/master

    Fix endianness detection by checking the actual endianness flag rather than part of the magic number.
  3. @edwardrf
  4. @edwardrf
Commits on Feb 24, 2014
  1. Remove legacy API names entirely:

    unpack => read
    pack => write
    width => size
Commits on Feb 23, 2014
  1. Retire vstruct/unpack.lua, replace unpackenv with with :read and :rea…

    …dbits methods
    There is no readahead optimization at the moment, so IO consisting of many small
    reads is likely to murder performance (again).
  2. Add "unpackvals" API function

Commits on Feb 14, 2014
Commits on Feb 6, 2014
  1. Update changelog.

  2. Implement format string splicing.

    You can now register a format string with vstruct.register(name, format), and splice it into another format
    string with "&name". API is still subject to revision.
  3. Reinstate the "unpack" argument in vstruct.records (since it's no lon…

    …ger handled by vstruct.unpack) and document it.
  4. Remove dead :show methods.

    I don't even remember what these were used for originally.
  5. Rework input argument checking.

    ast.parse has been simplified, and now just returns the root node of the AST.
    Argument checking is performed in the vstruct.api library and in the wrappers
    in vstruct.init; vstruct.api.compile is also responsible for wrapping the
    root node in something the user can call methods on.
  6. Implement AST walking.

    This is still a work in progress; all input and output buffering has been disabled, and the
    code generator is still present, with AST walking controlled by the _VSTRUCT_USE_AST_WALK global.
Commits on Feb 5, 2014
  1. Change ordering of operations in test.autotest, to improve tolerance …

    …of errors.
    Previously, if a pack or unpack raised, it would interrupt the test before any of the calls to record().
    With this change, it will record the result of each operation as soon as it completes, so any operation
    that completes without raising will get a result recorded.
  2. Implement vstruct.records

    This new API function returns an iterator over all the records in a file or string.
Commits on Nov 5, 2013
Commits on Jul 20, 2013
Something went wrong with that request. Please try again.