Skip to content

Releases: ToxicFrog/vstruct

v2.1.1

Choose a tag to compare

@ToxicFrog ToxicFrog released this 09 May 11:40

No API changes.

Lua 5.3 support has been improved: LUA_COMPAT_MATLIB is no longer required, although if you have it, vstruct will use the faster builtin math.frexp for floating-point operations rather than a slower Lua-only version.

Fixes

  • Several of the rockspecs had incorrect version bounds. These have now been fixed.

New features

  • when invoking the random test generator, you can now pass multiple test kinds on the command line, e.g. lua test.lua NROF_TESTS=8192 read write to run both read and write tests.
  • passing DISABLE_FREXP as the first argument to test.lua will cause it to disable the builtin math.frexp for all tests, and run them with the lua-only version

v2.1.0

Choose a tag to compare

@ToxicFrog ToxicFrog released this 09 May 11:33

No API changes.

This version supports Lua 5.3 (and retains support for lua 5.1, 5.2, and luajit). Lua 5.3 support requires it to have been compiled with LUA_COMPAT_MATHLIB defined.

v2.0.1

Choose a tag to compare

@ToxicFrog ToxicFrog released this 14 Oct 13:24
  • Added some basic performance tests
  • Dramatically improved performance when packing large arrays into strings
  • Moved the contents of ./vstruct/ into ./; this directory structure originally existed to support luadist, but made it harder for non-luadist users to install
  • LuaRocks support (thanks to @deepakjois)

v2.0.0

Choose a tag to compare

@ToxicFrog ToxicFrog released this 27 Jan 20:45

This is an enhancement release.

THIS RELEASE BREAKS BACKWARDS COMPATIBILITY. See README.md for details. In most cases migrating existing code to 2.0 should be trivial.

New in 2.0:

  • Major internal redesign and refactoring.
  • API uses read/write instead of pack/unpack.
  • Compiled format strings behave slightly differently.
  • Added vstruct.records() iterator.
  • Added vstruct.register() and format string splicing.
  • Improved test coverage.
  • Improved error reporting for invalid arguments to API functions.

v1.1.4

Choose a tag to compare

@ToxicFrog ToxicFrog released this 20 Jul 17:54

This is a bugfix release. If you use format p or pass non-integer values to formats i or u you should upgrade to this version to fix potentially serious bugs in these formats.

  • Fixed a bug where certain non-integer values passed to format p, i, or u can crash the library outright or cause it to silently write incorrect data. The root cause was an incorrect assumption that string.char would truncate rather than rounding.
  • Improvements to documentation and unit tests.

v1.1.3

Choose a tag to compare

@ToxicFrog ToxicFrog released this 08 Jul 18:26

This is an enhancement release.

New in this version:

  • x format extended to permit padding with a specific value: "x8,15" writes 8 bytes of 0x0F.
  • Improved error reporting for compile and runtime errors.
  • Improved test coverage, especially for error reporting.
  • README now uses markdown.
  • Documentation updates and clarification.